Re: [dm-devel] [PATCH] devmapper: remove useless using of memset in dm_get_info func

2020-07-30 Thread Benjamin Marzinski
On Thu, Jul 30, 2020 at 10:06:35PM +0800, Zhiqiang Liu wrote: > > In dm_get_info func, if do_get_info fails, we donot need to > call memset to assign 0 to *dmi which will be freed. > > Here, we remove the useless using of memset in dm_get_info func. > > Signed-off-by: Zhiqiang Liu Reviewed-by:

Re: [dm-devel] [PATCH] libmultipath: fix a memory leak in set_ble_device

2020-07-30 Thread Benjamin Marzinski
On Thu, Jul 30, 2020 at 09:27:28PM +0800, lixiaokeng wrote: > Hi. > I'm very sorry for subject mistake in first mail. > > In set_ble_device func, if blist is NULL or ble is NULL, > the vendor and product isn't free. We think it is not > reasonable that strdup(XXX) is used as set_ble_device >

Re: [dm-devel] [dm- devel][PATCH] libmultipath: fix a memory leak in dm_get_maps

2020-07-30 Thread Benjamin Marzinski
On Thu, Jul 30, 2020 at 12:01:36PM +0800, lixiaokeng wrote: > In dm_get_maps func, if vector_alloc_slot(mp) fails, the > mpp should be free. > > Here we call free_multipath(mpp, KEEP_PATHS) to free map. > > Signed-off-by: Lixiaokeng > Signed-off-by: Zhiqiang Liu Reviewed-by: Benjamin

[dm-devel] [PATCH] devmapper: remove useless using of memset in dm_get_info func

2020-07-30 Thread Zhiqiang Liu
In dm_get_info func, if do_get_info fails, we donot need to call memset to assign 0 to *dmi which will be freed. Here, we remove the useless using of memset in dm_get_info func. Signed-off-by: Zhiqiang Liu --- libmultipath/devmapper.c | 1 - 1 file changed, 1 deletion(-) diff --git

[dm-devel] [PATCH] libmultipath: fix a memory leak in set_ble_device

2020-07-30 Thread lixiaokeng
Hi. I'm very sorry for subject mistake in first mail. In set_ble_device func, if blist is NULL or ble is NULL, the vendor and product isn't free. We think it is not reasonable that strdup(XXX) is used as set_ble_device and store_ble functions' parameter. Here we call strdup() in store_ble and

Re: [dm-devel] [PATCH] libmultipath: fix a memory leak in set_ble_device

2020-07-30 Thread lixiaokeng
In set_ble_device func, if blist is NULL or ble is NULL, the vendor and product isn't freed. We think it is not reasonable that strdup(XXX) is used as set_ble_device and store_ble functions' parameter. Here we call strdup() in store_ble and set_ble_device functions and the string will be free if