naccyde / rpms / systemd

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