aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authormk2008-06-16 19:09:48 +0000
committermk2008-06-16 19:09:48 +0000
commit92d3e512e375f9f48f30a7f201f083a700cae7c1 (patch)
tree9107874e6c00dae8c489275dddc3fe19464695ca /parse.y
parent95f0da676903ac1975beaa3567cb8c5ba28660e5 (diff)
downloadcwm-92d3e512e375f9f48f30a7f201f083a700cae7c1.tar.gz
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.y9
1 files changed, 3 insertions, 6 deletions
diff --git a/parse.y b/parse.y
index c67ddbe..e80c1cb 100644
--- a/parse.y
+++ b/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.12 2008/06/15 02:47:46 oga Exp $ */
+/* $OpenBSD: parse.y,v 1.13 2008/06/16 19:09:48 mk Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -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)