X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Flttng-ctl.cpp;fp=src%2Flib%2Flttng-ctl%2Flttng-ctl.cpp;h=f99ce672c96db6fea7088b01cc63af7dd305c473;hp=c7fb313f90fb1eedfa0541b1014d8209473fd23e;hb=821a8b53753b1d39932ae8e208cb5d3e675a760d;hpb=238312393a8fad75330639148e42e5c3662ebb93 diff --git a/src/lib/lttng-ctl/lttng-ctl.cpp b/src/lib/lttng-ctl/lttng-ctl.cpp index c7fb313f9..f99ce672c 100644 --- a/src/lib/lttng-ctl/lttng-ctl.cpp +++ b/src/lib/lttng-ctl/lttng-ctl.cpp @@ -2416,14 +2416,14 @@ int lttng_list_events(struct lttng_handle *handle, (const char *) &lsm, 0, sizeof(lsm)); unsigned int nb_events = 0; + lttng_payload_init(&reply); + /* Safety check. An handle and channel name are mandatory. */ if (handle == NULL || channel_name == NULL) { ret = -LTTNG_ERR_INVALID; goto end; } - lttng_payload_init(&reply); - /* Initialize command parameters. */ lsm.cmd_type = LTTNG_LIST_EVENTS; ret = lttng_strncpy(lsm.session.name, handle->session_name,