Skip to content

Commit ff6993b

Browse files
Igor Druzhininmartinkpetersen
authored andcommitted
scsi: libfc: free response frame from GPN_ID
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>
1 parent 807b951 commit ff6993b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/scsi/libfc/fc_disc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,8 @@ static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp,
628628
}
629629
out:
630630
kref_put(&rdata->kref, fc_rport_destroy);
631+
if (!IS_ERR(fp))
632+
fc_frame_free(fp);
631633
}
632634

633635
/**

0 commit comments

Comments
 (0)