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

2020-11-09 Thread Benjamin Marzinski
On Mon, Nov 09, 2020 at 12:32:05PM +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 newmp need not >

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

2020-11-08 Thread lixiaokeng
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 newmp need not be copied to mpvec, we free newmp at the end of the func.