Re: scsi: pm8001: fix double free in pm8001_pci_probe

2017-08-10 Thread Martin K. Petersen
Pan, > In function pm8001_pci_probe(), on errors that the control flow jumps to > label err_out_ha_free, function pm8001_free() is called. In pm8001_free(), > scsi_host_put() is called to release shost, which keeps the return value > of scsi_host_alloc(). After pm8001_free() returns, kfree() is

Re: scsi: pm8001: fix double free in pm8001_pci_probe

2017-08-10 Thread Martin K. Petersen
Pan, > In function pm8001_pci_probe(), on errors that the control flow jumps to > label err_out_ha_free, function pm8001_free() is called. In pm8001_free(), > scsi_host_put() is called to release shost, which keeps the return value > of scsi_host_alloc(). After pm8001_free() returns, kfree() is

Re: scsi: pm8001: fix double free in pm8001_pci_probe

2017-08-08 Thread Jinpu Wang
On Tue, Aug 8, 2017 at 1:40 PM, Pan Bian wrote: > In function pm8001_pci_probe(), on errors that the control flow jumps to > label err_out_ha_free, function pm8001_free() is called. In pm8001_free(), > scsi_host_put() is called to release shost, which keeps the return value >

Re: scsi: pm8001: fix double free in pm8001_pci_probe

2017-08-08 Thread Jinpu Wang
On Tue, Aug 8, 2017 at 1:40 PM, Pan Bian wrote: > In function pm8001_pci_probe(), on errors that the control flow jumps to > label err_out_ha_free, function pm8001_free() is called. In pm8001_free(), > scsi_host_put() is called to release shost, which keeps the return value > of

scsi: pm8001: fix double free in pm8001_pci_probe

2017-08-08 Thread Pan Bian
In function pm8001_pci_probe(), on errors that the control flow jumps to label err_out_ha_free, function pm8001_free() is called. In pm8001_free(), scsi_host_put() is called to release shost, which keeps the return value of scsi_host_alloc(). After pm8001_free() returns, kfree() is called to free

scsi: pm8001: fix double free in pm8001_pci_probe

2017-08-08 Thread Pan Bian
In function pm8001_pci_probe(), on errors that the control flow jumps to label err_out_ha_free, function pm8001_free() is called. In pm8001_free(), scsi_host_put() is called to release shost, which keeps the return value of scsi_host_alloc(). After pm8001_free() returns, kfree() is called to free