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