Commit 3d04fea5 authored by Stelian Nirlu's avatar Stelian Nirlu Committed by Martin Schwidefsky

s390/bpf,jit: use kcalloc instead of kmalloc and memset

Signed-off-by: default avatarStelian Nirlu <steliannirlu@gmail.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 040495d1
......@@ -747,10 +747,9 @@ void bpf_jit_compile(struct sk_filter *fp)
if (!bpf_jit_enable)
return;
addrs = kmalloc(fp->len * sizeof(*addrs), GFP_KERNEL);
addrs = kcalloc(fp->len, sizeof(*addrs), GFP_KERNEL);
if (addrs == NULL)
return;
memset(addrs, 0, fp->len * sizeof(*addrs));
memset(&jit, 0, sizeof(cjit));
memset(&cjit, 0, sizeof(cjit));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment