mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
passing a null pointer to free() is valid; sprinkle a few free->xfree.
ok oga@
This commit is contained in:
parent
b23cef2e4a
commit
9203c7e8ca
3
client.c
3
client.c
@ -699,8 +699,7 @@ client_freehints(struct client_ctx *cc)
|
|||||||
XFree(cc->app_name);
|
XFree(cc->app_name);
|
||||||
if (cc->app_class != NULL)
|
if (cc->app_class != NULL)
|
||||||
XFree(cc->app_class);
|
XFree(cc->app_class);
|
||||||
if (cc->app_cliarg != NULL)
|
xfree(cc->app_cliarg);
|
||||||
xfree(cc->app_cliarg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
19
conf.c
19
conf.c
@ -170,35 +170,34 @@ conf_clear(struct conf *c)
|
|||||||
|
|
||||||
while ((cmd = TAILQ_FIRST(&c->cmdq)) != NULL) {
|
while ((cmd = TAILQ_FIRST(&c->cmdq)) != NULL) {
|
||||||
TAILQ_REMOVE(&c->cmdq, cmd, entry);
|
TAILQ_REMOVE(&c->cmdq, cmd, entry);
|
||||||
free(cmd);
|
xfree(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((kb = TAILQ_FIRST(&c->keybindingq)) != NULL) {
|
while ((kb = TAILQ_FIRST(&c->keybindingq)) != NULL) {
|
||||||
TAILQ_REMOVE(&c->keybindingq, kb, entry);
|
TAILQ_REMOVE(&c->keybindingq, kb, entry);
|
||||||
free(kb);
|
xfree(kb);
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((ag = TAILQ_FIRST(&c->autogroupq)) != NULL) {
|
while ((ag = TAILQ_FIRST(&c->autogroupq)) != NULL) {
|
||||||
TAILQ_REMOVE(&c->autogroupq, ag, entry);
|
TAILQ_REMOVE(&c->autogroupq, ag, entry);
|
||||||
free(ag->class);
|
xfree(ag->class);
|
||||||
if (ag->name)
|
if (ag->name)
|
||||||
free(ag->name);
|
xfree(ag->name);
|
||||||
free(ag->group);
|
xfree(ag->group);
|
||||||
free(ag);
|
xfree(ag);
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((wm = TAILQ_FIRST(&c->ignoreq)) != NULL) {
|
while ((wm = TAILQ_FIRST(&c->ignoreq)) != NULL) {
|
||||||
TAILQ_REMOVE(&c->ignoreq, wm, entry);
|
TAILQ_REMOVE(&c->ignoreq, wm, entry);
|
||||||
free(wm);
|
xfree(wm);
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((mb = TAILQ_FIRST(&c->mousebindingq)) != NULL) {
|
while ((mb = TAILQ_FIRST(&c->mousebindingq)) != NULL) {
|
||||||
TAILQ_REMOVE(&c->mousebindingq, mb, entry);
|
TAILQ_REMOVE(&c->mousebindingq, mb, entry);
|
||||||
free(mb);
|
xfree(mb);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->DefaultFontName != NULL)
|
xfree(c->DefaultFontName);
|
||||||
free(c->DefaultFontName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user