diff options
author | Hillf Danton <dhillf@gmail.com> | 2010-11-30 19:18:54 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 13:24:23 -0500 |
commit | 2d6dfb005e24d7e3404f4c0d333a94b050059173 (patch) | |
tree | 0695eb258a1cb9860a5dccf9a21e899025e843c9 | |
parent | 05fee645e96e732a79ad083cab8ddd4efd108e2c (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>
-rw-r--r-- | drivers/scsi/libfc/fc_lport.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 9be63edbf8f..9c1d6b8b24a 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c | |||
@@ -1762,8 +1762,10 @@ static int fc_lport_ct_request(struct fc_bsg_job *job, | |||
1762 | info->sg = job->reply_payload.sg_list; | 1762 | info->sg = job->reply_payload.sg_list; |
1763 | 1763 | ||
1764 | if (!lport->tt.exch_seq_send(lport, fp, fc_lport_bsg_resp, | 1764 | if (!lport->tt.exch_seq_send(lport, fp, fc_lport_bsg_resp, |
1765 | NULL, info, tov)) | 1765 | NULL, info, tov)) { |
1766 | kfree(info); | ||
1766 | return -ECOMM; | 1767 | return -ECOMM; |
1768 | } | ||
1767 | return 0; | 1769 | return 0; |
1768 | } | 1770 | } |
1769 | 1771 | ||