GFS2: replace count*size kzalloc by kcalloc

kcalloc manages count*sizeof overflow.

Cc: cluster-devel@redhat.com
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
Fabian Frederick 2014-06-25 20:40:45 +02:00 committed by Steven Whitehouse
parent fe0bbd2986
commit 6ec43b1838
1 changed files with 2 additions and 2 deletions

View File

@ -1036,8 +1036,8 @@ static int set_recover_size(struct gfs2_sbd *sdp, struct dlm_slot *slots,
new_size = old_size + RECOVER_SIZE_INC;
submit = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS);
result = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS);
submit = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
result = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
if (!submit || !result) {
kfree(submit);
kfree(result);