From: Javed Hasan Date: Tue, 25 Aug 2020 09:39:40 +0000 (-0700) Subject: scsi: libfc: Fix for double free() X-Git-Tag: v5.9-rc5~26^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a5b80f98534416b3b253859897e2ba1dc241e70;p=thirdparty%2Flinux.git 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 Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index d8cbc9c0e766b..e67abb184a8a0 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); } /**