65878a
From f1a8d50c069f57f0b9d23c81e50686bc8a2e43b7 Mon Sep 17 00:00:00 2001
65878a
From: Lennart Poettering <lennart@poettering.net>
65878a
Date: Tue, 10 Dec 2013 19:51:47 +0000
65878a
Subject: [PATCH] journald: use a bit more cleanup magic!
65878a
65878a
---
65878a
 src/journal/journald-stream.c | 8 +-------
65878a
 1 file changed, 1 insertion(+), 7 deletions(-)
65878a
65878a
diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
65878a
index 4080622..771a2bd 100644
65878a
--- a/src/journal/journald-stream.c
65878a
+++ b/src/journal/journald-stream.c
65878a
@@ -75,7 +75,7 @@ struct StdoutStream {
65878a
 
65878a
 static int stdout_stream_log(StdoutStream *s, const char *p) {
65878a
         struct iovec iovec[N_IOVEC_META_FIELDS + 5];
65878a
-        char *message = NULL, *syslog_priority = NULL, *syslog_facility = NULL, *syslog_identifier = NULL;
65878a
+        _cleanup_free_ char *message = NULL, *syslog_priority = NULL, *syslog_facility = NULL, *syslog_identifier = NULL;
65878a
         unsigned n = 0;
65878a
         int priority;
65878a
         char *label = NULL;
65878a
@@ -128,12 +128,6 @@ static int stdout_stream_log(StdoutStream *s, const char *p) {
65878a
 #endif
65878a
 
65878a
         server_dispatch_message(s->server, iovec, n, ELEMENTSOF(iovec), &s->ucred, NULL, label, label_len, s->unit_id, priority, 0);
65878a
-
65878a
-        free(message);
65878a
-        free(syslog_priority);
65878a
-        free(syslog_facility);
65878a
-        free(syslog_identifier);
65878a
-
65878a
         return 0;
65878a
 }
65878a