teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0897-journald-use-the-fact-that-client_context_release-re.patch

6f381c
From cd85a657c932725ac7c1b506dc6dd4270d1dc068 Mon Sep 17 00:00:00 2001
6f381c
From: Lennart Poettering <lennart@poettering.net>
6f381c
Date: Tue, 12 May 2020 19:15:38 +0200
6f381c
Subject: [PATCH] journald: use the fact that client_context_release() returns
6f381c
 NULL
6f381c
6f381c
(cherry picked from commit 020b4a023c2c6dda83afb9a82a62e640569c40c1)
6f381c
6f381c
Related: #2029426
6f381c
---
6f381c
 src/journal/journald-stream.c | 3 +--
6f381c
 1 file changed, 1 insertion(+), 2 deletions(-)
6f381c
6f381c
diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
6f381c
index 58752a5a24..ab1a855943 100644
6f381c
--- a/src/journal/journald-stream.c
6f381c
+++ b/src/journal/journald-stream.c
6f381c
@@ -570,8 +570,7 @@ static int stdout_stream_process(sd_event_source *es, int fd, uint32_t revents,
6f381c
                         goto terminate;
6f381c
 
6f381c
                 s->ucred = *ucred;
6f381c
-                client_context_release(s->server, s->context);
6f381c
-                s->context = NULL;
6f381c
+                s->context = client_context_release(s->server, s->context);
6f381c
         }
6f381c
 
6f381c
         s->length += l;