[SCSI] libfc: fix memory leakage in local port
There seems info should get freed when error encountered. 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
05fee645e9
commit
2d6dfb005e
1 changed files with 3 additions and 1 deletions
|
@ -1762,8 +1762,10 @@ static int fc_lport_ct_request(struct fc_bsg_job *job,
|
||||||
info->sg = job->reply_payload.sg_list;
|
info->sg = job->reply_payload.sg_list;
|
||||||
|
|
||||||
if (!lport->tt.exch_seq_send(lport, fp, fc_lport_bsg_resp,
|
if (!lport->tt.exch_seq_send(lport, fp, fc_lport_bsg_resp,
|
||||||
NULL, info, tov))
|
NULL, info, tov)) {
|
||||||
|
kfree(info);
|
||||||
return -ECOMM;
|
return -ECOMM;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue