diff options
author | Wu Guanghao <wuguanghao3@huawei.com> | 2023-03-03 17:21:32 +0100 |
---|---|---|
committer | Jes Sorensen <jes@trained-monkey.org> | 2023-03-08 19:54:30 +0100 |
commit | dac0b5121dd77bf1659b95248423445f932dfae4 (patch) | |
tree | 2b1e826a65282d906129b6302dc2e5aaa3123720 | |
parent | util.c: fix memleak in parse_layout_faulty() (diff) | |
download | mdadm-dac0b5121dd77bf1659b95248423445f932dfae4.tar.xz mdadm-dac0b5121dd77bf1659b95248423445f932dfae4.zip |
Detail.c: fix memleak in Detail()
char *sysdev = xstrdup() but not free() in for loop, will cause memory
leak
Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
Acked-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Acked-by: Coly Li <colyli@suse.de>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
-rw-r--r-- | Detail.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -303,6 +303,7 @@ int Detail(char *dev, struct context *c) if (path) printf("MD_DEVICE_%s_DEV=%s\n", sysdev, path); + free(sysdev); } } goto out; |