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 categories in an XDG menu

Reported by Coverity (CID #50147)

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

View File

@@ -645,6 +645,7 @@ static void getMenuHierarchyFor(char **xdgmenuspec)
p = strtok(NULL, ";");
}
wfree(category);
if (!*buf) /* come up with something if nothing found */
snprintf(buf, sizeof(buf), "%s", _("Other"));