Re: [PATCH -next] scsi: snic: fix double free in snic_tgt_create()

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

 



Zhu,

> The commit 41320b18a0e0 ("scsi: snic: Fix possible memory leak if
> device_add() fails") fix the memory leak caused by dev_set_name() when
> device_add() failed. While it did not consider that 'tgt' has already
> been released when put_device(&tgt->dev) is called. We removed
> kfree(tgt) in the error path to avoid double free 'tgt'.

Where is tgt freed prior to the kfree() call?

-- 
Martin K. Petersen	Oracle Linux Engineering



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux