[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251121033612.2423536-2-wuguanghao3@huawei.com>
Date: Fri, 21 Nov 2025 11:36:11 +0800
From: Wu Guanghao <wuguanghao3@...wei.com>
To: <tytso@....edu>, <linux-ext4@...r.kernel.org>, <adilger.kernel@...ger.ca>
CC: <djwong@...nel.org>, <yangyun50@...wei.com>, <wuguanghao3@...wei.com>
Subject: [PATCH v2 1/2] fsck: fix memory leak of inst->type
The function free_instance() does not release i->type, resulting in a
memory leak.
Signed-off-by: Wu Guanghao <wuguanghao3@...wei.com>
---
misc/fsck.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/misc/fsck.c b/misc/fsck.c
index 64d0e7c0..a06f2668 100644
--- a/misc/fsck.c
+++ b/misc/fsck.c
@@ -235,6 +235,7 @@ static void parse_escape(char *word)
static void free_instance(struct fsck_instance *i)
{
free(i->prog);
+ free(i->type);
free(i->device);
free(i->base_device);
free(i);
--
2.27.0
Powered by blists - more mailing lists