Bugfix: Fix small memory leak when initializing output Cons
This commit is contained in:
parent
f2fc523de7
commit
d3e3339a05
|
@ -223,6 +223,7 @@ void output_init_con(Output *output) {
|
||||||
match->insert_where = M_BELOW;
|
match->insert_where = M_BELOW;
|
||||||
TAILQ_INSERT_TAIL(&(topdock->swallow_head), match, matches);
|
TAILQ_INSERT_TAIL(&(topdock->swallow_head), match, matches);
|
||||||
|
|
||||||
|
FREE(topdock->name);
|
||||||
topdock->name = sstrdup("topdock");
|
topdock->name = sstrdup("topdock");
|
||||||
|
|
||||||
asprintf(&name, "[i3 con] top dockarea %s", con->name);
|
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");
|
DLOG("adding main content container\n");
|
||||||
Con *content = con_new(NULL, NULL);
|
Con *content = con_new(NULL, NULL);
|
||||||
content->type = CT_CON;
|
content->type = CT_CON;
|
||||||
|
FREE(content->name);
|
||||||
content->name = sstrdup("content");
|
content->name = sstrdup("content");
|
||||||
|
|
||||||
asprintf(&name, "[i3 con] content %s", con->name);
|
asprintf(&name, "[i3 con] content %s", con->name);
|
||||||
|
@ -255,6 +257,7 @@ void output_init_con(Output *output) {
|
||||||
match->insert_where = M_BELOW;
|
match->insert_where = M_BELOW;
|
||||||
TAILQ_INSERT_TAIL(&(bottomdock->swallow_head), match, matches);
|
TAILQ_INSERT_TAIL(&(bottomdock->swallow_head), match, matches);
|
||||||
|
|
||||||
|
FREE(bottomdock->name);
|
||||||
bottomdock->name = sstrdup("bottomdock");
|
bottomdock->name = sstrdup("bottomdock");
|
||||||
|
|
||||||
asprintf(&name, "[i3 con] bottom dockarea %s", con->name);
|
asprintf(&name, "[i3 con] bottom dockarea %s", con->name);
|
||||||
|
|
Loading…
Reference in New Issue