Bugfix: Fix small memory leak when initializing output Cons

next
Michael Stapelberg 2011-07-31 17:11:51 +02:00
parent f2fc523de7
commit d3e3339a05
1 changed files with 3 additions and 0 deletions

View 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);