提交 273ad8dc 编写于 作者: S Shahar Havivi 提交者: Greg Kroah-Hartman

Staging: zram: free device memory when init fails

Signed-off-by: NShahar Havivi <shaharh@redhat.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 9e693e43
......@@ -769,6 +769,7 @@ static int __init zram_init(void)
free_devices:
while (dev_id)
destroy_device(&devices[--dev_id]);
kfree(devices);
unregister:
unregister_blkdev(zram_major, "zram");
out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册