teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
Blob Blame History Raw
From cd85a657c932725ac7c1b506dc6dd4270d1dc068 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 12 May 2020 19:15:38 +0200
Subject: [PATCH] journald: use the fact that client_context_release() returns
 NULL

(cherry picked from commit 020b4a023c2c6dda83afb9a82a62e640569c40c1)

Related: #2029426
---
 src/journal/journald-stream.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
index 58752a5a24..ab1a855943 100644
--- a/src/journal/journald-stream.c
+++ b/src/journal/journald-stream.c
@@ -570,8 +570,7 @@ static int stdout_stream_process(sd_event_source *es, int fd, uint32_t revents,
                         goto terminate;
 
                 s->ucred = *ucred;
-                client_context_release(s->server, s->context);
-                s->context = NULL;
+                s->context = client_context_release(s->server, s->context);
         }
 
         s->length += l;