>From d89c54bd3e94866e983bc835ff7b3c37f8a8fb4d Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <[email protected]>
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 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/workspace.c b/src/workspace.c
index 7702d12..7b62798 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);
-- 
1.7.6


-- 
To unsubscribe, send mail to [email protected].

Reply via email to