1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +01:00

wmmenugen: Fix memory leak when parsing names for menus in XDG format

As reported by Coverity (CID #50146), if the function getLocalizedStringValue
returns without matching the entry, the storage for the entry's locale was
leaked.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2021-05-16 15:47:12 +02:00
committed by Carlos R. Mafra
parent 296456f361
commit 2a8fc1df9a

View File

@@ -448,11 +448,11 @@ static void getLocalizedStringValue(char **target, const char *line, int *match_
}
if (compare_matchlevel(match_level, locale)) {
wfree(locale);
*target = wstrdup(p + kstart);
return;
}
wfree(locale);
return;
}