[dm-devel] [PATCH v3] libmultipath: fix memory leaks in coalesce_paths

Martin Wilck mwilck at suse.com
Mon Nov 2 12:08:20 UTC 2020


On Mon, 2020-11-02 at 10:41 +0800, lixiaokeng wrote:
> When multipath -F are executed first and multipath -v2 or
> -d are executed later, asan will warn memory leaks. The
> reason is that the mpp allocated in coalesce_paths isn't
> freed. Here we use newmp to store mpp. If mpvec is NULL,
> we free newmp at the end of the func.
> 
> Signed-off-by: Lixiaokeng <lixiaokeng at huawei.com>
> Signed-off-by: Zhiqiang Liu <liuzhiqiang26 at huawei.com>
> Signed-off-by: Linfeilong <linfeilong at huawei.com>

This looks ok to me now. I'd like Ben to have a look too, though.
Also, I believe this will be applied after the largeish pending
series.

Regards
Martin





More information about the dm-devel mailing list