about summary refs log tree commit diff
path: root/parse.y
diff options
context:
space:
mode:
authormk <mk>2008-06-16 19:09:48 +0000
committermk <mk>2008-06-16 19:09:48 +0000
commit867652c484176909c61c74f59ba240039c8b9a1b (patch)
tree467b3386766f07163a74f7faa52ece07077c36c8 /parse.y
parent07cd0b1ac55f819f42b2936339843bb85e7630bb (diff)
downloadcwm-867652c484176909c61c74f59ba240039c8b9a1b.tar.gz
cwm-867652c484176909c61c74f59ba240039c8b9a1b.tar.xz
cwm-867652c484176909c61c74f59ba240039c8b9a1b.zip
Make this not crash when compiled with -g.
Found by myself, analysis by kurt@, fix by me with input from otto.

``Just get some fix in...'' deraadt
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y7
1 files changed, 2 insertions, 5 deletions
diff --git a/parse.y b/parse.y
index 98903e4..82ca689 100644
--- a/parse.y
+++ b/parse.y
@@ -100,11 +100,8 @@ yesno		: YES				{ $$ = 1; }
 		;
 
 main		: FONTNAME STRING		{
-			if (conf->DefaultFontName != NULL &&
-			    conf->DefaultFontName != DEFAULTFONTNAME)
-				free(conf->DefaultFontName);
-			conf->DefaultFontName = xstrdup($2);
-			free($2);
+			free(conf->DefaultFontName);
+			conf->DefaultFontName = $2;
 		}
 		| STICKY yesno {
 			if ($2 == 0)