Skip to content

Commit

Permalink
Staging: zram: free device memory when init fails
Browse files Browse the repository at this point in the history
Signed-off-by: Shahar Havivi <shaharh@redhat.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Shahar Havivi authored and Greg Kroah-Hartman committed Sep 4, 2010
1 parent 9e693e4 commit 273ad8d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/zram/zram_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 273ad8d

Please sign in to comment.