diff options
author | Shahar Havivi <shaharh@redhat.com> | 2010-08-28 10:09:05 +0300 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-08-31 11:13:55 +1000 |
commit | a694cc0457225ff5510c19f276a8b7e635feb1d0 (patch) | |
tree | e150c560a0cdcbccb2a1f09f43170340689e3104 /drivers | |
parent | daf29404add03950b3bc58427aaf159ae27f8e5f (diff) |
Staging: zram: free device memory when init fails
Signed-off-by: Shahar Havivi <shaharh@redhat.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/zram/zram_drv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index 77d4d715a789..722c840ac638 100644 --- a/drivers/staging/zram/zram_drv.c +++ b/drivers/staging/zram/zram_drv.c @@ -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: |