Commit ff6993bb authored by Igor Druzhinin's avatar Igor Druzhinin Committed by Martin K. Petersen

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.comReviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarIgor Druzhinin <igor.druzhinin@citrix.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 807b9515
...@@ -628,6 +628,8 @@ static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp, ...@@ -628,6 +628,8 @@ static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp,
} }
out: out:
kref_put(&rdata->kref, fc_rport_destroy); kref_put(&rdata->kref, fc_rport_destroy);
if (!IS_ERR(fp))
fc_frame_free(fp);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment