mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
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:
@@ -543,8 +543,6 @@ void wSessionRestoreLastWorkspace(WScreen * scr)
|
|||||||
/* Get the workspace number for the workspace name */
|
/* Get the workspace number for the workspace name */
|
||||||
w = wGetWorkspaceNumber(scr, value);
|
w = wGetWorkspaceNumber(scr, value);
|
||||||
|
|
||||||
wfree(value);
|
|
||||||
|
|
||||||
if (w != scr->current_workspace && w < scr->workspace_count)
|
if (w != scr->current_workspace && w < scr->workspace_count)
|
||||||
wWorkspaceChange(scr, w);
|
wWorkspaceChange(scr, w);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -455,8 +455,6 @@ int wDefaultGetStartWorkspace(WScreen * scr, char *instance, char *class)
|
|||||||
/* Get the workspace number for the workspace name */
|
/* Get the workspace number for the workspace name */
|
||||||
w = wGetWorkspaceNumber(scr, tmp);
|
w = wGetWorkspaceNumber(scr, tmp);
|
||||||
|
|
||||||
wfree(value);
|
|
||||||
|
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user