X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fenable_rotation.c;h=81a55b24c8aaec4810cec9ce54bcbc1621d1a6ea;hp=80ebc8cdc48a59f12a189b436f9d42b4a11cb330;hb=dbd512ea8aa5349849aeeccda6130aa9e28cf23c;hpb=3ae5c539f96856c83f3f17fbc37660d23462e3e5 diff --git a/src/bin/lttng/commands/enable_rotation.c b/src/bin/lttng/commands/enable_rotation.c index 80ebc8cdc..81a55b24c 100644 --- a/src/bin/lttng/commands/enable_rotation.c +++ b/src/bin/lttng/commands/enable_rotation.c @@ -69,11 +69,6 @@ static int setup_rotate(char *session_name, uint64_t timer, uint64_t size) goto error; } - ret = lttng_rotation_schedule_attr_set_session_name(attr, session_name); - if (ret < 0) { - goto error; - } - if (lttng_opt_mi) { /* Open rotation_schedule element */ ret = mi_lttng_writer_open_element(writer, @@ -114,7 +109,7 @@ static int setup_rotate(char *session_name, uint64_t timer, uint64_t size) } } - ret = lttng_rotation_set_schedule(attr); + ret = lttng_rotation_set_schedule(session_name, attr); if (ret) { ERR("%s", lttng_strerror(ret)); if (lttng_opt_mi) { @@ -152,6 +147,7 @@ static int setup_rotate(char *session_name, uint64_t timer, uint64_t size) error: ret = -1; end: + lttng_rotation_schedule_attr_destroy(attr); return ret; }