about summary refs log tree commit diff
path: root/conf.c
diff options
context:
space:
mode:
authorokan <okan>2009-01-23 20:47:45 +0000
committerokan <okan>2009-01-23 20:47:45 +0000
commit9203c7e8cacbc14878f49b5199650566b33b6e95 (patch)
treea3157e96a0ee6aa0763dccf787efd57f76af5da1 /conf.c
parentb23cef2e4ad9a311af720f08662f9243ee0de82a (diff)
downloadcwm-9203c7e8cacbc14878f49b5199650566b33b6e95.tar.gz
cwm-9203c7e8cacbc14878f49b5199650566b33b6e95.tar.xz
cwm-9203c7e8cacbc14878f49b5199650566b33b6e95.zip
passing a null pointer to free() is valid; sprinkle a few free->xfree.
ok oga@
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/conf.c b/conf.c
index b8ecc40..4ca9507 100644
--- a/conf.c
+++ b/conf.c
@@ -170,35 +170,34 @@ conf_clear(struct conf *c)
 
 	while ((cmd = TAILQ_FIRST(&c->cmdq)) != NULL) {
 		TAILQ_REMOVE(&c->cmdq, cmd, entry);
-		free(cmd);
+		xfree(cmd);
 	}
 
 	while ((kb = TAILQ_FIRST(&c->keybindingq)) != NULL) {
 		TAILQ_REMOVE(&c->keybindingq, kb, entry);
-		free(kb);
+		xfree(kb);
 	}
 
 	while ((ag = TAILQ_FIRST(&c->autogroupq)) != NULL) {
 		TAILQ_REMOVE(&c->autogroupq, ag, entry);
-		free(ag->class);
+		xfree(ag->class);
 		if (ag->name)
-			free(ag->name);
-		free(ag->group);
-		free(ag);
+			xfree(ag->name);
+		xfree(ag->group);
+		xfree(ag);
 	}
 
 	while ((wm = TAILQ_FIRST(&c->ignoreq)) != NULL) {
 		TAILQ_REMOVE(&c->ignoreq, wm, entry);
-		free(wm);
+		xfree(wm);
 	}
 
 	while ((mb = TAILQ_FIRST(&c->mousebindingq)) != NULL) {
 		TAILQ_REMOVE(&c->mousebindingq, mb, entry);
-		free(mb);
+		xfree(mb);
 	}
 
-	if (c->DefaultFontName != NULL)
-		free(c->DefaultFontName);
+	xfree(c->DefaultFontName);
 }
 
 void