systemd/0142-Fix-memory-leak-in-std...

24 lines
689 B
Diff

From 371ce08fb9814a39ca2f984d6040aaf0f6c172e8 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);
}