代码拉取完成,页面将自动刷新
From d8600cb5319060f294049a81320f5de4c48cf5d5 Mon Sep 17 00:00:00 2001
From: Evgeny Vereshchagin <evvers@ya.ru>
Date: Fri, 10 Aug 2018 12:52:07 +0000
Subject: [PATCH] journald: free the allocated memory before returning from
dev_kmsg_record
This fixes a minor memory leak.
(cherry picked from commit 30eddcd51b8a472e05d3b8d1f0b89fbd3e094d71)
Resolves: #1696224
---
src/journal/journald-kmsg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
index 7ad673362a..7644bebfc8 100644
--- a/src/journal/journald-kmsg.c
+++ b/src/journal/journald-kmsg.c
@@ -191,7 +191,7 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) {
e = memchr(k, '\n', l);
if (!e)
- return;
+ goto finish;
*e = 0;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。