Skip to content

Commit

Permalink
scsi: libfc: free response frame from GPN_ID
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Igor Druzhinin authored and Martin K. Petersen committed Feb 21, 2020
1 parent 807b951 commit ff6993b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/scsi/libfc/fc_disc.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,8 @@ static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp,
}
out:
kref_put(&rdata->kref, fc_rport_destroy);
if (!IS_ERR(fp))
fc_frame_free(fp);
}

/**
Expand Down

0 comments on commit ff6993b

Please sign in to comment.