mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 05:18:06 +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:
committed by
Carlos R. Mafra
parent
4894e3fe4d
commit
dc4df6455a
@@ -136,7 +136,6 @@ static void chooseIconCallback(WMWidget * self, void *clientData)
|
|||||||
if (!panel->destroyed) {
|
if (!panel->destroyed) {
|
||||||
if (result) {
|
if (result) {
|
||||||
WMSetTextFieldText(panel->iconField, file);
|
WMSetTextFieldText(panel->iconField, file);
|
||||||
wfree(file);
|
|
||||||
updateSettingsPanelIcon(panel);
|
updateSettingsPanelIcon(panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,6 +145,8 @@ static void chooseIconCallback(WMWidget * self, void *clientData)
|
|||||||
* the icon chooser */
|
* the icon chooser */
|
||||||
DestroyDockAppSettingsPanel(panel);
|
DestroyDockAppSettingsPanel(panel);
|
||||||
}
|
}
|
||||||
|
if (result)
|
||||||
|
wfree(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void panelBtnCallback(WMWidget * self, void *data)
|
static void panelBtnCallback(WMWidget * self, void *data)
|
||||||
|
|||||||
Reference in New Issue
Block a user