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