mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
wmmenugen: Fix memory leak when parsing categories in an XDG menu
Reported by Coverity (CID #50147) Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
f2cd2c9f03
commit
296456f361
@@ -645,6 +645,7 @@ static void getMenuHierarchyFor(char **xdgmenuspec)
|
|||||||
p = strtok(NULL, ";");
|
p = strtok(NULL, ";");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wfree(category);
|
||||||
|
|
||||||
if (!*buf) /* come up with something if nothing found */
|
if (!*buf) /* come up with something if nothing found */
|
||||||
snprintf(buf, sizeof(buf), "%s", _("Other"));
|
snprintf(buf, sizeof(buf), "%s", _("Other"));
|
||||||
|
|||||||
Reference in New Issue
Block a user