mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 12:58:08 +01:00
WMaker: fix memory leak in the window inspector when saving settings (Coverity #50174)
As pointed by Coverity, there is one case where the application dictionary which is created temporarily (when saving the changes in the Window Inspector) could be left allocated. It is now freed in the common path to avoid problems. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
a75699faef
commit
e750f9307e
@@ -598,7 +598,6 @@ static void saveSettings(WMWidget *button, void *client_data)
|
||||
WMPutInPLDictionary(dict, key2, appDic);
|
||||
}
|
||||
WMReleasePropList(key2);
|
||||
WMReleasePropList(appDic);
|
||||
} else if (wwin->main_window != wwin->client_win) {
|
||||
WApplication *wapp = wApplicationOf(wwin->main_window);
|
||||
|
||||
@@ -617,13 +616,12 @@ static void saveSettings(WMWidget *button, void *client_data)
|
||||
WMPutInPLDictionary(dict, key2, appDic);
|
||||
}
|
||||
WMReleasePropList(key2);
|
||||
WMReleasePropList(appDic);
|
||||
}
|
||||
} else {
|
||||
WMMergePLDictionaries(winDic, appDic, True);
|
||||
different |= different2;
|
||||
WMReleasePropList(appDic);
|
||||
}
|
||||
WMReleasePropList(appDic);
|
||||
|
||||
WMRemoveFromPLDictionary(dict, key);
|
||||
if (different)
|
||||
|
||||
Reference in New Issue
Block a user