projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef13f01
)
UBIFS: replace count*size kzalloc by kcalloc
author
Fabian Frederick
<fabf@skynet.be>
Mon, 23 Jun 2014 16:41:23 +0000
(18:41 +0200)
committer
Artem Bityutskiy
<artem.bityutskiy@linux.intel.com>
Sat, 19 Jul 2014 06:53:52 +0000
(09:53 +0300)
kcalloc manages count*sizeof overflow.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
fs/ubifs/super.c
patch
|
blob
|
history
diff --git
a/fs/ubifs/super.c
b/fs/ubifs/super.c
index 3b0c2c0b389fc98ccf8a508f887219e0374e4b7c..177dd629d88fbf60a2aa335c2ba5eba0de015833 100644
(file)
--- a/
fs/ubifs/super.c
+++ b/
fs/ubifs/super.c
@@
-796,8
+796,8
@@
static int alloc_wbufs(struct ubifs_info *c)
{
int i, err;
- c->jheads = k
zalloc(c->jhead_cnt *
sizeof(struct ubifs_jhead),
- GFP_KERNEL);
+ c->jheads = k
calloc(c->jhead_cnt,
sizeof(struct ubifs_jhead),
+
GFP_KERNEL);
if (!c->jheads)
return -ENOMEM;