]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] rd: memory leak on rd_init() failure
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 17 Oct 2006 07:10:27 +0000 (00:10 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 17 Oct 2006 15:18:48 +0000 (08:18 -0700)
commit56099b68f8a1049654ee4424dd02f483b4bc3ff6
tree22c0b158dd9bf54e516eb7a9d6f50e3405b729d7
parent4baa47960b689ebae22d39ad51d040b49e6b7cbb
[PATCH] rd: memory leak on rd_init() failure

If RAM disk driver initialization fails due to blk_alloc_queue() faulure, the
gendisk structs stored in rd_disks[] will not be freed completely.

This patch resolves that memory leak case by doing alloc_disk() and
blk_alloc_queue() at the same time.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/rd.c