mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
WMaker: fix memory leak when respawning after crash (Coverity #50165)
As pointed by Coverity, the memory allocated to contain the argument list for spawning ourself was never released. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
659519f306
commit
4501d4c078
@@ -125,6 +125,7 @@ int MonitorLoop(int argc, char **argv)
|
||||
* the crash panel and ask the user what to do */
|
||||
if (time(NULL) - last_start < 3) {
|
||||
if (showCrashDialog(WTERMSIG(status)) == 0) {
|
||||
wfree(child_argv);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -133,5 +134,6 @@ int MonitorLoop(int argc, char **argv)
|
||||
} else
|
||||
break;
|
||||
}
|
||||
wfree(child_argv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user