From 86a3475bc5087da2a28015247ff18672905044f4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 6 Jan 2011 23:52:17 +0100 Subject: [PATCH] execute,util: fix two small memory leaks --- src/execute.c | 3 +++ src/util.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/execute.c b/src/execute.c index 8f486e200..1e8dfaf77 100644 --- a/src/execute.c +++ b/src/execute.c @@ -1406,6 +1406,9 @@ void exec_context_done(ExecContext *c) { if (c->cpuset) CPU_FREE(c->cpuset); + + free(c->utmp_id); + c->utmp_id = NULL; } void exec_command_done(ExecCommand *c) { diff --git a/src/util.c b/src/util.c index aa1f19ed6..67a75c570 100644 --- a/src/util.c +++ b/src/util.c @@ -3090,6 +3090,9 @@ void status_welcome(void) { status_printf("Welcome to \x1B[%sm%s\x1B[0m!\n", const_color ? const_color : ansi_color, const_pretty ? const_pretty : pretty_name); + + free(ansi_color); + free(pretty_name); } char *replace_env(const char *format, char **env) { -- 2.30.2