From: Igor Druzhinin Date: Tue, 14 Jan 2020 14:43:19 +0000 (+0000) Subject: scsi: libfc: free response frame from GPN_ID X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=358e3a57a2558069863404249d8af3bdca7e1563;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git scsi: libfc: free response frame from GPN_ID [ Upstream commit ff6993bb79b9f99bdac0b5378169052931b65432 ] fc_disc_gpn_id_resp() should be the last function using it so free it here to avoid memory leak. Link: https://lore.kernel.org/r/1579013000-14570-2-git-send-email-igor.druzhinin@citrix.com Reviewed-by: Hannes Reinecke Signed-off-by: Igor Druzhinin Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index bb9c1c016643..28b50ab2fbb0 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c @@ -652,6 +652,8 @@ redisc: } out: kref_put(&rdata->kref, fc_rport_destroy); + if (!IS_ERR(fp)) + fc_frame_free(fp); } /**