[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20100828070901.GA31943@redhat.com>
Date: Sat, 28 Aug 2010 10:09:05 +0300
From: Shahar Havivi <shaharh@...hat.com>
To: linux-next@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, greg@...ah.com
Subject: [PATCH] zram: free device memory when init fails
Signed-off-by: Shahar Havivi <shaharh@...hat.com>
---
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 77d4d71..e8d2319 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:
--
1.7.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists