From 4501d4c0786081fa27e4f0130bfed57547e52aa2 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Tue, 20 May 2014 21:46:43 +0200 Subject: [PATCH] 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 --- src/monitor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/monitor.c b/src/monitor.c index c023b306..f06ff517 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -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; }