Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ec43b18 authored by Fabian Frederick's avatar Fabian Frederick Committed by Steven Whitehouse
Browse files

GFS2: replace count*size kzalloc by kcalloc



kcalloc manages count*sizeof overflow.

Cc: cluster-devel@redhat.com
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent fe0bbd29
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);