All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] libiscsi: fix iscsi pool leak
@ 2009-01-16 18:36 michaelc
  2009-01-16 18:36 ` [PATCH 2/2] qla4xxx: do not reuse session when connecting to different target port michaelc
  2009-01-16 18:38 ` [PATCH 1/2] libiscsi: fix iscsi pool leak Mike Christie
  0 siblings, 2 replies; 3+ messages in thread
From: michaelc @ 2009-01-16 18:36 UTC (permalink / raw)
  To: linux-scsi; +Cc: Mike Christie

From: Mike Christie <michaelc@cs.wisc.edu>

I am not sure what happened. It looks like we have always leaked
the q->queue that is allocated from the kfifo_init call. nab finally
noticed that we were leaking and this patch fixes it by adding a
kfree call to iscsi_pool_free. kfifo_free is not used per kfifo_init's
instructions to use kfree.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
 drivers/scsi/libiscsi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 7225b6e..257c241 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1981,6 +1981,7 @@ void iscsi_pool_free(struct iscsi_pool *q)
 		kfree(q->pool[i]);
 	if (q->pool)
 		kfree(q->pool);
+	kfree(q->queue);
 }
 EXPORT_SYMBOL_GPL(iscsi_pool_free);
 
-- 
1.6.0.4


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

end of thread, other threads:[~2009-01-16 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-16 18:36 [PATCH 1/2] libiscsi: fix iscsi pool leak michaelc
2009-01-16 18:36 ` [PATCH 2/2] qla4xxx: do not reuse session when connecting to different target port michaelc
2009-01-16 18:38 ` [PATCH 1/2] libiscsi: fix iscsi pool leak Mike Christie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.