mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
Fix memory leak reported by Coverity
As reported in CID #331577, we re-use the variable 'tmp' without freeing the previously allocated pointer. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
fd56152202
commit
97a9300aa4
@@ -673,9 +673,13 @@ static void constructMenu(WMenu * menu, WMenuEntry * entry)
|
||||
|
||||
tmp = wexpandpath(path[i]);
|
||||
|
||||
if (strstr(tmp, "#usergnusteppath#") == tmp)
|
||||
if (strstr(tmp, "#usergnusteppath#") == tmp) {
|
||||
char *old_tmp = tmp;
|
||||
|
||||
tmp = wstrconcat(wusergnusteppath(),
|
||||
tmp + 17);
|
||||
wfree(old_tmp);
|
||||
}
|
||||
|
||||
wfree(path[i]);
|
||||
lpath = getLocalizedMenuFile(tmp);
|
||||
|
||||
Reference in New Issue
Block a user