X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Flttng-ctl.c;h=012ba13b070c7c77707057322cf62e5fc9905f29;hb=33aaae1ca51f961133d86d686b62a00e80cb4def;hp=089c9c1f8cff680232968807597bdf3249be213b;hpb=aca0a945595775a0c6d953662a6f292992d962e8;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index 089c9c1f8..012ba13b0 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -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,