Fixed memory leak in wWorkspaceRename.

The function wtrimspace returns a wmalloced memory region, therefore
it must be wfreed after usage again.

Please take note that this also happens with every single line
of menu files, which will get fixed in a separate commit.
This commit is contained in:
Tobias Stoeckmann
2012-05-07 20:46:12 -03:00
committed by Carlos R. Mafra
parent 33328d997e
commit 4a4775f076
+1
View File
@@ -662,6 +662,7 @@ void wWorkspaceRename(WScreen * scr, int workspace, char *name)
strncpy(buf, tmp, MAX_WORKSPACENAME_WIDTH);
}
buf[MAX_WORKSPACENAME_WIDTH] = 0;
wfree(tmp);
/* update workspace */
wfree(scr->workspaces[workspace]->name);