mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 17:51:43 +00:00
[SCSI] libfc: fix memory leakage in remote port
There seems rdata should get put before return. Signed-off-by: Hillf Danton <dhillf@gmail.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
72e0daad55
commit
0e9e3d3b15
@ -652,7 +652,7 @@ void fc_rport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,
|
||||
FC_RPORT_DBG(rdata, "Received a FLOGI %s\n", fc_els_resp_type(fp));
|
||||
|
||||
if (fp == ERR_PTR(-FC_EX_CLOSED))
|
||||
return;
|
||||
goto put;
|
||||
|
||||
mutex_lock(&rdata->rp_mutex);
|
||||
|
||||
@ -689,6 +689,7 @@ out:
|
||||
fc_frame_free(fp);
|
||||
err:
|
||||
mutex_unlock(&rdata->rp_mutex);
|
||||
put:
|
||||
kref_put(&rdata->kref, rdata->local_port->tt.rport_destroy);
|
||||
return;
|
||||
bad:
|
||||
|
Loading…
Reference in New Issue
Block a user