mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 12:58:08 +01:00
WMaker: fix memory leak in the root menu parser (Coverity #50122)
As pointed by Coverity, if the word "WITH" was used in the content of the root menu definition then its string would not be freed. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
bee02df72f
commit
741243a792
@@ -571,6 +571,7 @@ static void separateCommand(char *line, char ***file, char **command)
|
|||||||
*command = wstrdup(tmp);
|
*command = wstrdup(tmp);
|
||||||
else
|
else
|
||||||
wwarning(_("%s: missing command"), line);
|
wwarning(_("%s: missing command"), line);
|
||||||
|
wfree(token);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
WMAddToArray(array, token);
|
WMAddToArray(array, token);
|
||||||
|
|||||||
Reference in New Issue
Block a user