On Tue, 2020-08-18 at 21:02 +0800, lixiaokeng wrote: > 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 functions fail. > Because constant string like "sdb" will be their parameter, > char * is changed to const char *. This is base on > upstream-queue branch in openSUSE/multipath-tools. > > The type of ble->vendor_reg is regex_t struct but not a > pointer, so it can not be set NULL.
Ups. Right. Thanks for correcting me. > > Signed-off-by: Lixiaokeng <[email protected]> > Signed-off-by: Zhiqiang Liu <[email protected]> Reviewed-by: Martin Wilck <[email protected]> -- dm-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/dm-devel
