]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Fix small memory leak when initializing output Cons
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 31 Jul 2011 15:11:51 +0000 (17:11 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 31 Jul 2011 15:11:51 +0000 (17:11 +0200)
src/randr.c

index bdd553656a8a921f832e10cfbe6460a628f2abf0..e57549b73d6257b4471a287d10604c36f524a432 100644 (file)
@@ -223,6 +223,7 @@ void output_init_con(Output *output) {
     match->insert_where = M_BELOW;
     TAILQ_INSERT_TAIL(&(topdock->swallow_head), match, matches);
 
+    FREE(topdock->name);
     topdock->name = sstrdup("topdock");
 
     asprintf(&name, "[i3 con] top dockarea %s", con->name);
@@ -236,6 +237,7 @@ void output_init_con(Output *output) {
     DLOG("adding main content container\n");
     Con *content = con_new(NULL, NULL);
     content->type = CT_CON;
+    FREE(content->name);
     content->name = sstrdup("content");
 
     asprintf(&name, "[i3 con] content %s", con->name);
@@ -255,6 +257,7 @@ void output_init_con(Output *output) {
     match->insert_where = M_BELOW;
     TAILQ_INSERT_TAIL(&(bottomdock->swallow_head), match, matches);
 
+    FREE(bottomdock->name);
     bottomdock->name = sstrdup("bottomdock");
 
     asprintf(&name, "[i3 con] bottom dockarea %s", con->name);