1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 13:28:05 +01:00

WMaker: fix memory leak in the docked apps icon chooser (Coverity #50117.1)

As pointed by Coverity, a string could be left unfreed in the case where
the docked application's settings dialog is closed before an icon would be
actually chosen from the Icon Chooser Dialog.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-05-20 21:46:32 +02:00
committed by Carlos R. Mafra
parent 4894e3fe4d
commit dc4df6455a

View File

@@ -136,7 +136,6 @@ static void chooseIconCallback(WMWidget * self, void *clientData)
if (!panel->destroyed) {
if (result) {
WMSetTextFieldText(panel->iconField, file);
wfree(file);
updateSettingsPanelIcon(panel);
}
@@ -146,6 +145,8 @@ static void chooseIconCallback(WMWidget * self, void *clientData)
* the icon chooser */
DestroyDockAppSettingsPanel(panel);
}
if (result)
wfree(file);
}
static void panelBtnCallback(WMWidget * self, void *data)