mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
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
This commit is contained in:
parent
07cd0b1ac5
commit
867652c484
2
conf.c
2
conf.c
@ -171,7 +171,7 @@ conf_init(struct conf *c)
|
||||
strlcpy(c->termpath, "xterm", sizeof(c->termpath));
|
||||
strlcpy(c->lockpath, "xlock", sizeof(c->lockpath));
|
||||
|
||||
c->DefaultFontName = DEFAULTFONTNAME;
|
||||
c->DefaultFontName = xstrdup(DEFAULTFONTNAME);
|
||||
}
|
||||
|
||||
void
|
||||
|
7
parse.y
7
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)
|
||||
|
Loading…
Reference in New Issue
Block a user