[SCSI] libfc: fix memory leakage in local port
authorHillf Danton <[email protected]>
Wed, 1 Dec 2010 00:18:54 +0000 (16:18 -0800)
committerJames Bottomley <[email protected]>
Tue, 21 Dec 2010 18:24:23 +0000 (12:24 -0600)
There seems info should get freed when error encountered.

Signed-off-by: Hillf Danton <[email protected]>
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
drivers/scsi/libfc/fc_lport.c

index 9be63edbf8fb9095624222f7dc6398957e0abd28..9c1d6b8b24a3503e7042d89c8e80c3b9f4272e58 100644 (file)
@@ -1762,8 +1762,10 @@ static int fc_lport_ct_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;
 }