mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
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:
committed by
Carlos R. Mafra
parent
27a2259934
commit
894d1c80a3
@@ -292,7 +292,11 @@ static void storeData(_Panel *panel)
|
||||
int i;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
SetStringForKey(WMGetTextFieldText(panel->autoDelayT[i]), auto_delay[i].key);
|
||||
char *str;
|
||||
|
||||
str = WMGetTextFieldText(panel->autoDelayT[i]);
|
||||
SetStringForKey(str, auto_delay[i].key);
|
||||
wfree(str);
|
||||
}
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -750,6 +750,7 @@ static void storeData(_Panel * panel)
|
||||
tmp = WMGetTextFieldText(panel->ddelaT);
|
||||
if (sscanf(tmp, "%i", &i) == 1 && i > 0)
|
||||
SetIntegerForKey(i, "DoubleClickTime");
|
||||
wfree(tmp);
|
||||
|
||||
SetBoolForKey(WMGetButtonSelected(panel->disaB), "DisableWSMouseActions");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user