From: Bart Van Assche Date: Sun, 30 Aug 2009 10:36:48 +0000 (+0200) Subject: [SCSI] libsrp: fix memory leak in srp_ring_free() X-Git-Tag: v2.6.32-rc1~689^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afffd3dabe5209882c8cc59a373a4d33b5db304a;p=pandora-kernel.git [SCSI] libsrp: fix memory leak in srp_ring_free() This patch fixes a memory leak in the libsrp function srp_ring_free(). It is not documented whether or not this function should free the ring pointer itself. But the source code of the callers of this function (srp_target_alloc() and srp_target_free()) makes it clear that srp_ring_free() should deallocate the ring pointer itself. Furthermore, the patch below makes srp_ring_free() deallocate all memory allocated by srp_ring_alloc(). This patch affects the ibmvstgt driver, which is the only in-tree driver that calls the srp_ring_free() function (indirectly). Signed-off-by: Bart Van Assche Acked-by: FUJITA Tomonori Cc: Stable Tree Signed-off-by: James Bottomley --- Reading git-diff-tree failed