Message ID | 20210621221814.200894db@oasis.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | 5b0975afe96eebc521423fb5ef09b344ab7d49a0 |
Headers | show |
Series | trace-cmd: Initialize option list earlier in create_file_fd() | expand |
diff --git a/lib/trace-cmd/trace-output.c b/lib/trace-cmd/trace-output.c index b3d0fe7e..78a25350 100644 --- a/lib/trace-cmd/trace-output.c +++ b/lib/trace-cmd/trace-output.c @@ -938,6 +938,8 @@ create_file_fd(int fd, struct tracecmd_input *ihandle, return NULL; memset(handle, 0, sizeof(*handle)); + list_head_init(&handle->options); + handle->fd = fd; if (tracing_dir) { handle->tracing_dir = strdup(tracing_dir); @@ -950,8 +952,6 @@ create_file_fd(int fd, struct tracecmd_input *ihandle, if (select_file_version(handle, ihandle)) goto out_free; - list_head_init(&handle->options); - buf[0] = 23; buf[1] = 8; buf[2] = 68;