代码拉取完成,页面将自动刷新
From 14e0760c251fd5fc51731f7b58079c73f5055d64 Mon Sep 17 00:00:00 2001
From: Benjamin Robin <dev@benjarobin.fr>
Date: Sun, 14 Apr 2019 17:21:27 +0200
Subject: [PATCH] basic/fileio: Fix memory leak if READ_FULL_FILE_SECURE flag
is used
The memory leak introduced in #12223 (15f8f02)
(cherry picked from commit 315a51982af2d480de9f7539346f30425e37a01e)
Signed-off-by: Guorui Yu <GuoRui.Yu@linux.alibaba.com>
---
src/basic/fileio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index 3abeb0d7f4..bb804e3afa 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -438,6 +438,7 @@ int read_full_stream_full(
}
memcpy_safe(t, buf, n);
explicit_bzero_safe(buf, n);
+ buf = mfree(buf);
} else {
t = realloc(buf, n_next + 1);
if (!t)
--
2.39.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。