From linux-next-owner@vger.kernel.org Mon Aug 30 16:55:05 2010 Date: Sat, 28 Aug 2010 10:09:05 +0300 From: Shahar Havivi To: linux-next@vger.kernel.org Cc: linux-kernel@vger.kernel.org, greg@kroah.com Subject: Staging: zram: free device memory when init fails Message-ID: <20100828070901.GA31943@redhat.com> Content-Disposition: inline Signed-off-by: Shahar Havivi Cc: Nitin Gupta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/zram/zram_drv.c | 1 + 1 file changed, 1 insertion(+) --- 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: