fuse3/0002-libfuse-Assign-NULL-to-old-to-avoid-free-it-twice-52.patch

30 lines
812 B
Diff
Raw Normal View History

2021-05-22 14:51:51 +08:00
From d632df7ef5ede4d5a818a1bedbea8659113470b8 Mon Sep 17 00:00:00 2001
From: winndows <winndows@163.com>
Date: Wed, 1 Jul 2020 13:20:01 +0800
Subject: [PATCH 1/2] libfuse: Assign NULL to "old" to avoid free it twice
(#522)
Assign NULL to "old" at the first free(), to avoid the possible 2nd free() for it.
Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Co-authored-by: Liao Pingfang <liao.pingfang@zte.com.cn>
---
lib/modules/iconv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/modules/iconv.c b/lib/modules/iconv.c
index eb5edd8..3a4db7c 100644
--- a/lib/modules/iconv.c
+++ b/lib/modules/iconv.c
@@ -705,6 +705,7 @@ static struct fuse_fs *iconv_new(struct fuse_args *args,
if (old) {
setlocale(LC_CTYPE, old);
free(old);
+ old = NULL;
}
ic->next = next[0];
--
1.8.3.1