]> www.pilppa.org Git - linux-2.6-omap-h63xx.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)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sun, 25 Jan 2009 13:54:37 +0000 (07:54 -0600)
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>
drivers/scsi/libiscsi.c

index 7225b6e2029e53e8f57e42078cbef77865bbe1a1..257c24115de9108132d955ab5e488cf0b6c37c3e 100644 (file)
@@ -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);