From 4e2ee27bfa721f90388fe0b2bd71a55ec85891db Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Thu, 26 Apr 2012 11:11:32 -0300 Subject: [PATCH] Fix wrong wfree() use 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. --- src/session.c | 2 -- src/wdefaults.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/session.c b/src/session.c index 2d020c72..9dba574c 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 d89671bd..dd91b91d 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; }