summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJaved Hasan <jhasan@marvell.com>2020-08-25 12:39:40 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-09-01 04:42:51 +0300
commit5a5b80f98534416b3b253859897e2ba1dc241e70 (patch)
tree7e175148d5298ad523506bf423c41dafb0e1f925 /drivers/scsi
parentea403fde7552bd61bad6ea45e3feb99db77cb31e (diff)
downloadlinux-5a5b80f98534416b3b253859897e2ba1dc241e70.tar.xz
scsi: libfc: Fix for double free()
Fix for '&fp->skb' double free. Link: https://lore.kernel.org/r/20200825093940.19612-1-jhasan@marvell.com Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Javed Hasan <jhasan@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libfc/fc_disc.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index d8cbc9c0e766..e67abb184a8a 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -634,8 +634,6 @@ free_fp:
fc_frame_free(fp);
out:
kref_put(&rdata->kref, fc_rport_destroy);
- if (!IS_ERR(fp))
- fc_frame_free(fp);
}
/**