scsi: libfc: free response frame from GPN_ID
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Tue, 14 Jan 2020 14:43:19 +0000 (14:43 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 21 Feb 2020 22:56:32 +0000 (17:56 -0500)
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 <hare@suse.de>
Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libfc/fc_disc.c

index 9c5f7c9..2b865c6 100644 (file)
@@ -628,6 +628,8 @@ redisc:
        }
 out:
        kref_put(&rdata->kref, fc_rport_destroy);
+       if (!IS_ERR(fp))
+               fc_frame_free(fp);
 }
 
 /**