Re: [PATCH] Staging: line6: fix leaks in line6_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 12, 2010 at 06:47:30PM +0400, Kulikov Vasiliy wrote:
> -	if (ret < 0) {
> -		line6_destruct(interface);
> -		return ret;
> -	}
> +	if (ret < 0)
> +		goto err_put;

This should be:
		goto err_destruct;

regards,
dan carpenter

>  
>  	dev_info(&interface->dev, "Line6 %s now attached\n",
>  		 line6->properties->name);
>  	line6_devices[devnum] = line6;
>  	line6_list_devices();
> +	return 0;
> +
> +err_destruct:
> +	line6_destruct(interface);
> +err_put:
> +	usb_put_intf(interface);
> +	usb_put_dev(usbdev);
>  	return ret;
>  }
>  

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux