]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
SCSI: libiscsi: fix iscsi pool leak
authorMike Christie <michaelc@cs.wisc.edu>
Fri, 16 Jan 2009 18:36:51 +0000 (12:36 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 20 Feb 2009 22:36:57 +0000 (14:36 -0800)
commit 2f5899a39dcffb404c9a3d06ad438aff3e03bf04 upstream.

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>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/libiscsi.c

index 299e075a7b34295f6a8ea8721270a329913a3244..55ac5c3f30324716b919f7139e21741495541b83 100644 (file)
@@ -1844,6 +1844,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);