Commit ca21ef31 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] another rd.c leak

Free the request queues on the rd_init() error recovery path.
parent e8f3ccd7
...@@ -380,8 +380,10 @@ static int __init rd_init(void) ...@@ -380,8 +380,10 @@ static int __init rd_init(void)
out_queue: out_queue:
unregister_blkdev(RAMDISK_MAJOR, "ramdisk"); unregister_blkdev(RAMDISK_MAJOR, "ramdisk");
out: out:
while (i--) while (i--) {
put_disk(rd_disks[i]); put_disk(rd_disks[i]);
blk_cleanup_queue(rd_queue[i]);
}
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment