Blame SOURCES/0142-journald-free-the-allocated-memory-before-returning-.patch

a3e2b5
From d8600cb5319060f294049a81320f5de4c48cf5d5 Mon Sep 17 00:00:00 2001
a3e2b5
From: Evgeny Vereshchagin <evvers@ya.ru>
a3e2b5
Date: Fri, 10 Aug 2018 12:52:07 +0000
a3e2b5
Subject: [PATCH] journald: free the allocated memory before returning from
a3e2b5
 dev_kmsg_record
a3e2b5
a3e2b5
This fixes a minor memory leak.
a3e2b5
a3e2b5
(cherry picked from commit 30eddcd51b8a472e05d3b8d1f0b89fbd3e094d71)
a3e2b5
a3e2b5
Resolves: #1696224
a3e2b5
---
a3e2b5
 src/journal/journald-kmsg.c | 2 +-
a3e2b5
 1 file changed, 1 insertion(+), 1 deletion(-)
a3e2b5
a3e2b5
diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
a3e2b5
index 7ad673362a..7644bebfc8 100644
a3e2b5
--- a/src/journal/journald-kmsg.c
a3e2b5
+++ b/src/journal/journald-kmsg.c
a3e2b5
@@ -191,7 +191,7 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) {
a3e2b5
 
a3e2b5
                 e = memchr(k, '\n', l);
a3e2b5
                 if (!e)
a3e2b5
-                        return;
a3e2b5
+                        goto finish;
a3e2b5
 
a3e2b5
                 *e = 0;
a3e2b5