Output *output;
croot = con_new(NULL);
+ FREE(croot->name);
croot->name = "root";
croot->type = CT_ROOT;
continue;
Con *oc = con_new(croot);
+ FREE(oc->name);
oc->name = strdup(output->name);
oc->type = CT_OUTPUT;
oc->rect = output->rect;
ws = con_new(NULL);
ws->type = CT_WORKSPACE;
ws->num = c;
+ FREE(ws->name);
asprintf(&(ws->name), "%d", c);
c++;
con_attach(ws, oc, false);
x_set_name(workspace, name);
free(name);
workspace->type = CT_WORKSPACE;
- workspace->name = strdup(num);
+ FREE(workspace->name);
+ workspace->name = sstrdup(num);
/* We set ->num to the number if this workspace’s name consists only of
* a positive number. Otherwise it’s a named ws and num will be -1. */
char *end;