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/[email protected] Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Igor Druzhinin <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 807b951 commit ff6993b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)