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

2020-11-08 Thread lixiaokeng
>> >> +if (mpvec) >> +newmp = mpvec; >> +else >> +newmp = vector_alloc(); >> +if (!newmp) { >> +condlog(0, "can not allocate newmp"); >> +return ret; >> +} >> + > > It's possible that this patch is based on different code than I am

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

2020-11-02 Thread Benjamin Marzinski
On Mon, Nov 02, 2020 at 10:41:22AM +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, > w

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

2020-11-02 Thread Martin Wilck
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

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

2020-11-01 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 mpvec is NULL, we free newmp at the end of the func. Signed-off-by: Lixiaokeng Signe