mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
Easier error path in wDockTrackWindowLaunch.
There is no need to allocate command if the very next line might fail independently from comand, freeing that memory again in error path.
This commit is contained in:
committed by
Carlos R. Mafra
parent
b5df97db95
commit
70d8ad515b
@@ -2863,15 +2863,11 @@ void wDockTrackWindowLaunch(WDock *dock, Window window)
|
||||
Bool found = False;
|
||||
char *command = NULL;
|
||||
|
||||
command = GetCommandForWindow(window);
|
||||
|
||||
if (!PropGetWMClass(window, &wm_class, &wm_instance) || (!wm_class && !wm_instance)) {
|
||||
|
||||
if (command)
|
||||
wfree(command);
|
||||
return;
|
||||
}
|
||||
|
||||
command = GetCommandForWindow(window);
|
||||
retry:
|
||||
for (i = 0; i < dock->max_icons; i++) {
|
||||
icon = dock->icon_array[i];
|
||||
|
||||
Reference in New Issue
Block a user