cgroups: don't initiliaze NULL log

parent f3ef7e67
...@@ -328,10 +328,8 @@ static int bpf_program_load_kernel(struct bpf_program *prog, char *log_buf, ...@@ -328,10 +328,8 @@ static int bpf_program_load_kernel(struct bpf_program *prog, char *log_buf,
if ((log_size != 0 && !log_buf) || (log_size == 0 && log_buf)) if ((log_size != 0 && !log_buf) || (log_size == 0 && log_buf))
return ret_errno(EINVAL); return ret_errno(EINVAL);
if (prog->kernel_fd >= 0) { if (prog->kernel_fd >= 0)
memset(log_buf, 0, log_size);
return 0; return 0;
}
attr = &(union bpf_attr){ attr = &(union bpf_attr){
.prog_type = prog->prog_type, .prog_type = prog->prog_type,
......
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