richardphibel / rpms / systemd

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