From 4ef53197ff043a3d30b610d03e29baae91a03ed2 Mon Sep 17 00:00:00 2001 From: Michael Knudsen Date: Mon, 16 Jun 2008 19:09:49 +0000 Subject: 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 --- app/cwm/parse.y | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'app/cwm/parse.y') diff --git a/app/cwm/parse.y b/app/cwm/parse.y index c67ddbe79..e80c1cbba 100644 --- a/app/cwm/parse.y +++ b/app/cwm/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 @@ -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) -- cgit v1.2.3