chiark / gitweb /
execute,util: fix two small memory leaks
authorLennart Poettering <lennart@poettering.net>
Thu, 6 Jan 2011 22:52:17 +0000 (23:52 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 6 Jan 2011 22:52:17 +0000 (23:52 +0100)
src/execute.c
src/util.c

index 8f486e2004a1f43923d77a2b80bd81692e475206..1e8dfaf7700fa7f62f712105b570e73062873fbb 100644 (file)
@@ -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) {
index aa1f19ed69a3deec6e27259922c65a94bc0ecfe8..67a75c5702fa9f0490df241ad5eefb5e9b26f966 100644 (file)
@@ -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) {