mirror of
https://github.com/gryf/wmaker.git
synced 2026-10-06 09:20:34 +02:00
As pointed by Coverity, the function 'ProgGetWMClass' always allocates the strings returned in wm_class and wm_instance, so they always must be freed. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
1 parent
d292c62080
commit
bee02df72f
1 file changed
+4
-1
+4
-1
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user