teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
Blob Blame History Raw
From ac67da03ebc56ab45b3fbb166fe961cb753d2777 Mon Sep 17 00:00:00 2001
From: Dan McGee <dan@archlinux.org>
Date: Sun, 8 Dec 2013 14:33:45 -0600
Subject: [PATCH] Fix memory leak in stdout journal streams

Just as 'identifier' is strdup-ed and freed, we need to do the same for
unit_id.
---
 src/journal/journald-stream.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
index 9c4efec..4080622 100644
--- a/src/journal/journald-stream.c
+++ b/src/journal/journald-stream.c
@@ -339,6 +339,7 @@ void stdout_stream_free(StdoutStream *s) {
 #endif
 
         free(s->identifier);
+        free(s->unit_id);
         free(s);
 }