]> git.ipfire.org Git - thirdparty/mdadm.git/commit
super-intel.c: fix memleak in find_disk_attached_hba()
authorWu Guanghao <wuguanghao3@huawei.com>
Fri, 3 Mar 2023 16:21:34 +0000 (00:21 +0800)
committerJes Sorensen <jes@trained-monkey.org>
Wed, 8 Mar 2023 18:54:30 +0000 (13:54 -0500)
commit5d2434d18b6bc71bd16678b1a6d1cc3a92f1d415
tree67f694835e57d38f5c799b045debc5c006472896
parent50cd06b484bb99bfacdd4f9d2f8ee5e52bfc7bd3
super-intel.c: fix memleak in find_disk_attached_hba()

If disk_path = diskfd_to_devpath(), we need free(disk_path) before
return, otherwise there will be a memory leak

Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
Reviewed-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Acked-by: Coly Li <colyli@suse.de>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
super-intel.c