summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorHillf Danton <dhillf@gmail.com>2010-11-30 16:18:59 -0800
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 12:24:23 -0600
commit72e0daad555bc0ca2e7abd68593087d098d866a8 (patch)
tree838e338bc811a418579b4138ed7f683e73da77c2 /drivers/scsi
parent2d6dfb005e24d7e3404f4c0d333a94b050059173 (diff)
[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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libfc/fc_lport.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 9c1d6b8b24a..b91a11e4fa0 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -1703,8 +1703,10 @@ static int fc_lport_els_request(struct fc_bsg_job *job,
info->sg = job->reply_payload.sg_list;
if (!lport->tt.exch_seq_send(lport, fp, fc_lport_bsg_resp,
- NULL, info, tov))
+ NULL, info, tov)) {
+ kfree(info);
return -ECOMM;
+ }
return 0;
}