There is a bug which happens when one modifies the "Initial Workspace" in the
"Attributes..." menu. Upon saving the change wmaker segfaults.

Commit ad373ef0ddb27 ("WindowMaker: New function wGetWorkspaceNumber")
used wfree() in variables which were not wmalloc'ed. Fix this.

Signed-off-by: Carlos R. Mafra <[email protected]>
---
 src/session.c   |    2 --
 src/wdefaults.c |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/session.c b/src/session.c
index 2d020c7..9dba574 100644
--- a/src/session.c
+++ b/src/session.c
@@ -543,8 +543,6 @@ void wSessionRestoreLastWorkspace(WScreen * scr)
        /* Get the workspace number for the workspace name */
        w = wGetWorkspaceNumber(scr, value);
 
-       wfree(value);
-
        if (w != scr->current_workspace && w < scr->workspace_count)
                wWorkspaceChange(scr, w);
 }
diff --git a/src/wdefaults.c b/src/wdefaults.c
index d89671b..dd91b91 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -455,8 +455,6 @@ int wDefaultGetStartWorkspace(WScreen * scr, char 
*instance, char *class)
        /* Get the workspace number for the workspace name */
        w = wGetWorkspaceNumber(scr, tmp);
 
-       wfree(value);
-
        return w;
 }
 
-- 
1.7.7


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

Reply via email to