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:
Tobias Stoeckmann authored and Carlos R. Mafra committed 2012-05-07 20:37:48 -03:00
1 parent b5df97db95
commit 70d8ad515b
1 file changed
+1 -5
+1 -5
View File
@@ -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];