From: Wu Guanghao Date: Tue, 14 Oct 2025 02:50:18 +0000 (+0800) Subject: mdadm: Fix memory leak issue in check_raid() X-Git-Tag: mdadm-4.5~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cb225b4949ca63f9e8298a7feb00e04c71c7e9e;p=thirdparty%2Fmdadm.git mdadm: Fix memory leak issue in check_raid() check_raid() alloc for st, but did not release it when exiting. Signed-off-by: Wu Guanghao --- diff --git a/util.c b/util.c index 43d1c119..5d6fe800 100644 --- a/util.c +++ b/util.c @@ -693,6 +693,8 @@ int check_raid(int fd, char *name) /* Looks like GPT or MBR */ pr_err("partition table exists on %s\n", name); } + + free(st); return 1; }