git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2e24e8
)
mtd: check parts pointer before using it
author
Jason Liu
<jason.hui@linaro.org>
Wed, 24 Aug 2011 11:26:28 +0000
(19:26 +0800)
committer
Artem Bityutskiy
<artem.bityutskiy@intel.com>
Sun, 11 Sep 2011 12:02:18 +0000
(15:02 +0300)
The code has the check for parts but it called after kmemdup,
kmemdup(parts, sizeof(*parts) * nr_parts,...)
if (!parts)
return -ENOMEM
In fact, we need check parts before safely using it.
and we also need check the real_parts to make sure kmemdup
allocation sucessfully.
Signed-off-by: Jason Liu <jason.hui@linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
drivers/mtd/mtdcore.c
patch
|
blob
|
history
diff --cc
drivers/mtd/mtdcore.c
Simple merge