Re: [PATCH V2 1/5] ublk_drv: avoid to leak ublk device in case that add_disk fails

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

 



maybe s/avoid/don't/ in the subject?

> -	get_device(&ub->cdev_dev);
>  	ret = add_disk(disk);
>  	if (ret) {
>  		put_disk(disk);
>  		goto out_unlock;

Maybe just add a put_device here in the error branch to keep
things simple?



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux