lkml.org 
[lkml]   [2003]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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));
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.038 / U:2.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site