From: René Scharfe Date: Sat, 24 Oct 2015 12:23:20 GMT Subject: [PATCH 2/2] daemon: plug memory leak Message-ID: <562B7838.8050009@web.de> In-Reply-To: <562B756F.1020305@web.de> Call child_process_clear() when a child ends to release the memory allocated for its environment. This is necessary because unlike all other users of start_command() we don't call finish_command(), which would have taken care of that for us. This leak was introduced by f063d38b (daemon: use cld->env_array when re-spawning). Signed-off-by: Rene Scharfe --- daemon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon.c b/daemon.c index 56679a1..be70cd4 100644 --- a/daemon.c +++ b/daemon.c @@ -802,6 +802,7 @@ static void check_dead_children(void) /* remove the child */ *cradle = blanket->next; live_children--; + child_process_clear(&blanket->cld); free(blanket); } else cradle = &blanket->next; -- 2.6.2