Skip to contentSkip to conversation

zram: free device memory when init fails

PATCH New Shahar Havivi 1 participant 1 message Aug 28, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 zram: free device memory when init fails

---
 drivers/staging/zram/zram_drv.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/staging/zram/zram_drv.c +1 -0
index 77d4d71..e8d2319 100644
@@ -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:
Signature · 1 line
1.7.2.1