Re: [dm-devel] [PATCH] libmultipath: free pp if store_path fails in disassemble_map

2020-07-23 Thread Zhiqiang Liu
On 2020/7/23 21:22, Benjamin Marzinski wrote: > On Thu, Jul 23, 2020 at 09:28:51AM +0800, Zhiqiang Liu wrote: >> >> >> On 2020/7/23 4:53, Benjamin Marzinski wrote: >>> On Wed, Jul 22, 2020 at 04:41:28PM +0800, Zhiqiang Liu wrote: In disassemble_map func, one pp will be allocated and stored

Re: [dm-devel] [PATCH] libmultipath: free pp if store_path fails in disassemble_map

2020-07-23 Thread Benjamin Marzinski
On Thu, Jul 23, 2020 at 09:28:51AM +0800, Zhiqiang Liu wrote: > > > On 2020/7/23 4:53, Benjamin Marzinski wrote: > > On Wed, Jul 22, 2020 at 04:41:28PM +0800, Zhiqiang Liu wrote: > >> In disassemble_map func, one pp will be allocated and stored in pathvec > >> (only in client mode) and

Re: [dm-devel] [PATCH] libmultipath: free pp if store_path fails in disassemble_map

2020-07-22 Thread Zhiqiang Liu
On 2020/7/23 4:53, Benjamin Marzinski wrote: > On Wed, Jul 22, 2020 at 04:41:28PM +0800, Zhiqiang Liu wrote: >> In disassemble_map func, one pp will be allocated and stored in pathvec >> (only in client mode) and pgp->paths. However, if store_path fails, pp >> will not be freed, then memory

[dm-devel] [PATCH] libmultipath: free pp if store_path fails in disassemble_map

2020-07-22 Thread Zhiqiang Liu
In disassemble_map func, one pp will be allocated and stored in pathvec (only in client mode) and pgp->paths. However, if store_path fails, pp will not be freed, then memory leak problem occurs. Here, we will call free_path to free pp when store_path fails. Signed-off-by: Zhiqiang Liu