]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] another rd.c leak
authorAndrew Morton <akpm@osdl.org>
Thu, 4 Mar 2004 12:31:35 +0000 (04:31 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 4 Mar 2004 12:31:35 +0000 (04:31 -0800)
Free the request queues on the rd_init() error recovery path.

drivers/block/rd.c

index 6331ab5ef0e678569379173e2cf04a376fce8387..e626344c9b589e0237ae5a9d8d863f1468c2c0ee 100644 (file)
@@ -380,8 +380,10 @@ static int __init rd_init(void)
 out_queue:
        unregister_blkdev(RAMDISK_MAJOR, "ramdisk");
 out:
-       while (i--)
+       while (i--) {
                put_disk(rd_disks[i]);
+               blk_cleanup_queue(rd_queue[i]);
+       }
        return err;
 }