memory leak in mtdblock.c found by checker
PATCH 1/1 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
drivers/mtd/mtdblock.c renamed from drivers/mtd/mtdblock.c.orig +1 -1
@@ -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));
David Woodhouse
AppliedQuoted 4 lines · Felipe W Damasio
Hi David,
Patch against 2.6-test5, which checks the right variable if kmalloc
failed.
Applied to CVS. Going to Linus some time soon if he hasn't already got it. Thanks.
Signature · 1 line
dwmw2