Skip to contentSkip to conversation

memory leak in mtdblock.c found by checker

PATCH Applied Felipe W Damasio 2 participants 2 messages Sep 23, 2003 – Oct 4, 2003 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

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));
#1 lore raw
Quoted 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