linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] libfc: fix memory leakage in local port
@ 2010-10-27 12:40 Hillf Danton
  2010-10-27 12:43 ` [PATCH 2/2] " Hillf Danton
  2010-10-28 23:12 ` [Open-FCoE] [PATCH 1/2] " Robert Love
  0 siblings, 2 replies; 6+ messages in thread
From: Hillf Danton @ 2010-10-27 12:40 UTC (permalink / raw)
  To: devel; +Cc: linux-scsi

There seems info should get freed when error encountered.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- a/drivers/scsi/libfc/fc_lport.c	2010-09-13 07:07:38.000000000 +0800
+++ b/drivers/scsi/libfc/fc_lport.c	2010-10-27 20:33:36.000000000 +0800
@@ -1766,8 +1766,10 @@ static int fc_lport_ct_request(struct fc
 	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;
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-10-28 23:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-27 12:40 [PATCH 1/2] libfc: fix memory leakage in local port Hillf Danton
2010-10-27 12:43 ` [PATCH 2/2] " Hillf Danton
2010-10-28 23:13   ` [Open-FCoE] " Robert Love
2010-10-28 23:12 ` [Open-FCoE] [PATCH 1/2] " Robert Love
2010-10-28 23:31   ` Joe Eykholt
2010-10-28 23:35     ` Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).