summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaved Hasan <jhasan@marvell.com>2020-08-25 12:39:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-23 13:10:57 +0300
commitd7c720df355273db19093c487c460fb2067068dd (patch)
treeec48f094f87af99bc8c17f6f60bb19818cefec1a
parent70f1396b14549ef191df79bd29f9760467cbc54d (diff)
downloadlinux-d7c720df355273db19093c487c460fb2067068dd.tar.xz
scsi: libfc: Fix for double free()
[ Upstream commit 5a5b80f98534416b3b253859897e2ba1dc241e70 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 78cf5b32bca6..0b3f4538c1d4 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -646,8 +646,6 @@ free_fp:
fc_frame_free(fp);
out:
kref_put(&rdata->kref, fc_rport_destroy);
- if (!IS_ERR(fp))
- fc_frame_free(fp);
}
/**