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 ad373ef0dd ("WindowMaker: New function wGetWorkspaceNumber")
used wfree() in variables which were not wmalloc'ed. Fix this.
This commit is contained in:
Carlos R. Mafra committed 2012-04-26 11:11:32 -03:00
1 parent 39fdb451ba
commit 4e2ee27bfa
2 files changed
-4

No files matched your search

-2
View File
@@ -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);
}
-2
View File
@@ -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;
}