diff --git a/src/dock.c b/src/dock.c index 6c76d1c1..3fd3dbe1 100644 --- a/src/dock.c +++ b/src/dock.c @@ -3204,8 +3204,11 @@ void wDockTrackWindowLaunch(WDock *dock, Window window) Bool found = False; char *command = NULL; - if (!PropGetWMClass(window, &wm_class, &wm_instance) || (!wm_class && !wm_instance)) + if (!PropGetWMClass(window, &wm_class, &wm_instance)) { + free(wm_class); + free(wm_instance); return; + } command = GetCommandForWindow(window); retry: