fix an off-by-one error
SVN-Revision: 8427
This commit is contained in:
parent
60157ca058
commit
ce9fff401a
2 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ diff -urN linux-2.6.21.1.old/drivers/mtd/devices/block2mtd.c linux-2.6.21.1.dev/
|
|||
+ if (!mtdname)
|
||||
+ mtdname = devname;
|
||||
+
|
||||
+ dev->mtd.name = kmalloc(strlen(mtdname), GFP_KERNEL);
|
||||
+ dev->mtd.name = kmalloc(strlen(mtdname) + 1, GFP_KERNEL);
|
||||
+
|
||||
if (!dev->mtd.name)
|
||||
goto devinit_err;
|
||||
|
|
|
@ -32,7 +32,7 @@ diff -urN linux-2.6.21.1.old/drivers/mtd/devices/block2mtd.c linux-2.6.21.1.dev/
|
|||
+ if (!mtdname)
|
||||
+ mtdname = devname;
|
||||
+
|
||||
+ dev->mtd.name = kmalloc(strlen(mtdname), GFP_KERNEL);
|
||||
+ dev->mtd.name = kmalloc(strlen(mtdname) + 1, GFP_KERNEL);
|
||||
+
|
||||
if (!dev->mtd.name)
|
||||
goto devinit_err;
|
||||
|
|
Loading…
Reference in a new issue