ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
9fc0f6
From ac67da03ebc56ab45b3fbb166fe961cb753d2777 Mon Sep 17 00:00:00 2001
9fc0f6
From: Dan McGee <dan@archlinux.org>
9fc0f6
Date: Sun, 8 Dec 2013 14:33:45 -0600
9fc0f6
Subject: [PATCH] Fix memory leak in stdout journal streams
9fc0f6
9fc0f6
Just as 'identifier' is strdup-ed and freed, we need to do the same for
9fc0f6
unit_id.
9fc0f6
---
9fc0f6
 src/journal/journald-stream.c | 1 +
9fc0f6
 1 file changed, 1 insertion(+)
9fc0f6
9fc0f6
diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
9fc0f6
index 9c4efec..4080622 100644
9fc0f6
--- a/src/journal/journald-stream.c
9fc0f6
+++ b/src/journal/journald-stream.c
9fc0f6
@@ -339,6 +339,7 @@ void stdout_stream_free(StdoutStream *s) {
9fc0f6
 #endif
9fc0f6
 
9fc0f6
         free(s->identifier);
9fc0f6
+        free(s->unit_id);
9fc0f6
         free(s);
9fc0f6
 }
9fc0f6