diff options
author | Pan Bian <bianpan2016@163.com> | 2017-08-08 19:40:30 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-08-10 19:55:35 -0400 |
commit | bc1371c181b503fe925ae292cd96618f305790cd (patch) | |
tree | 5992e86ed76195b4ff9e05afa92e9960c5a1f4fa /drivers/scsi/mvsas | |
parent | 3b8328e2e0fda49202b502154608dd6fb8e8ed37 (diff) | |
download | linux-bc1371c181b503fe925ae292cd96618f305790cd.tar.gz linux-bc1371c181b503fe925ae292cd96618f305790cd.tar.bz2 linux-bc1371c181b503fe925ae292cd96618f305790cd.zip |
scsi: pm8001: fix double free in pm8001_pci_probe
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 shost again, resulting in a double free bug. This patch removes
scsi_host_put() from pm8001_free() and explicitly calls scsi_host_put()
to release Scsi_Host in need.
Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mvsas')
0 files changed, 0 insertions, 0 deletions