[dm-devel] [PATCH] libmultipath/checkers/rbd: fix free in libcheck_init

Benjamin Marzinski bmarzins at redhat.com
Fri Nov 4 17:50:21 UTC 2016


On Fri, Nov 04, 2016 at 03:54:29PM +0800, peng.liang5 at zte.com.cn wrote:
> From: PengLiang <peng.liang5 at zte.com.cn>

ACK

-Ben

> 
> There is an incorrect free maybe causing memory leak.
> 
> Signed-off-by: PengLiang <peng.liang5 at zte.com.cn>
> ---
>  libmultipath/checkers/rbd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libmultipath/checkers/rbd.c b/libmultipath/checkers/rbd.c
> index 481d860..9ea0572 100644
> --- a/libmultipath/checkers/rbd.c
> +++ b/libmultipath/checkers/rbd.c
> @@ -174,7 +174,7 @@ int libcheck_init(struct checker * c)
>  
>  	ct->image = strdup(image);
>  	if (!ct->image)
> -		goto free_info;
> +		goto free_username;
>  
>  	pool = udev_device_get_sysattr_value(bus_dev, "pool");
>  	if (!pool)
> -- 
> 2.8.1.windows.1




More information about the dm-devel mailing list