From 4a4775f076751be19303c04d0c2d13bae56f82c6 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Sat, 5 May 2012 11:48:00 +0200 Subject: [PATCH] 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. --- src/workspace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/workspace.c b/src/workspace.c index 7702d124..7b62798b 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -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);