提交 6ec43b18 编写于 作者: F Fabian Frederick 提交者: Steven Whitehouse

GFS2: replace count*size kzalloc by kcalloc

kcalloc manages count*sizeof overflow.

Cc: cluster-devel@redhat.com
Signed-off-by: NFabian Frederick <fabf@skynet.be>
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 fe0bbd29
...@@ -1036,8 +1036,8 @@ static int set_recover_size(struct gfs2_sbd *sdp, struct dlm_slot *slots, ...@@ -1036,8 +1036,8 @@ static int set_recover_size(struct gfs2_sbd *sdp, struct dlm_slot *slots,
new_size = old_size + RECOVER_SIZE_INC; new_size = old_size + RECOVER_SIZE_INC;
submit = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS); submit = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
result = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS); result = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
if (!submit || !result) { if (!submit || !result) {
kfree(submit); kfree(submit);
kfree(result); kfree(result);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册