Messages in this thread Patch in this message | | | Date | Tue, 23 Sep 2003 16:14:39 -0300 | From | Felipe W Damasio <> | Subject | [PATCH] memory leak in mtdblock.c found by checker |
| |
Hi David,
Patch against 2.6-test5, which checks the right variable if kmalloc failed.
Please apply,
Felipe --- 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)); | |