aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-23 12:41:23 -0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-07-19 02:53:52 -0400
commit86b4c14de34d19ec3fc4662761feed9918491658 (patch)
treea5642ffb1d8605fbbcb383c22a11afdfe38225c5 /fs/ubifs
parentef13f01828a27e1ada6d9a337c0b940f327aeea3 (diff)
UBIFS: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 3b0c2c0b389f..177dd629d88f 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -796,8 +796,8 @@ static int alloc_wbufs(struct ubifs_info *c)
796{ 796{
797 int i, err; 797 int i, err;
798 798
799 c->jheads = kzalloc(c->jhead_cnt * sizeof(struct ubifs_jhead), 799 c->jheads = kcalloc(c->jhead_cnt, sizeof(struct ubifs_jhead),
800 GFP_KERNEL); 800 GFP_KERNEL);
801 if (!c->jheads) 801 if (!c->jheads)
802 return -ENOMEM; 802 return -ENOMEM;
803 803