2003-09-23 19:26:25

by Felipe W Damasio

[permalink] [raw]
Subject: [PATCH] memory leak in mtdblock.c found by checker

--- linux-2.6.0-test5/drivers/mtd/mtdblock.c.orig 2003-09-23 16:09:37.000000000 -0300
+++ linux-2.6.0-test5/drivers/mtd/mtdblock.c 2003-09-23 16:10:50.000000000 -0300
@@ -275,7 +275,7 @@

/* OK, it's not open. Create cache info for it */
mtdblk = kmalloc(sizeof(struct mtdblk_dev), GFP_KERNEL);
- if (!mtdblks)
+ if (!mtdblk)
return -ENOMEM;

memset(mtdblk, 0, sizeof(*mtdblk));


Attachments:
mtdblock-leak.patch (391.00 B)