1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-21 09:15:46 +01:00

WPrefs: fix memory leak when saving settings (Coverity #50140 + #50157 + #50159)

As pointed by Coverity, the string returned by 'WMGetTextFieldText' is
allocated dynamically, so it must be freed when not needed anymore.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-05-31 19:58:45 +02:00
committed by Carlos R. Mafra
parent 27a2259934
commit 894d1c80a3
3 changed files with 7 additions and 1 deletions

View File

@@ -138,6 +138,7 @@ static void storeData(_Panel * panel)
if (sscanf(str, "%i", &i) != 1)
i = 0;
SetIntegerForKey(i, "RaiseDelay");
free(str);
SetBoolForKey(WMGetButtonSelected(panel->ignB), "IgnoreFocusClick");
SetBoolForKey(WMGetButtonSelected(panel->newB), "AutoFocus");