mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01: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:
committed by
Carlos R. Mafra
parent
d292c62080
commit
bee02df72f
@@ -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