X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=829e59dd4b67aad2e9003e3b33a16310a09c6645;hb=6ede7c4837890c6bb59a92d4fe987c12e2d3b30f;hp=51b73bc4e6d02f22d60163b430f9a16f20fea8fa;hpb=246a599cb05c4a0e9221f24f17d28f0a04d05c28;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 51b73bc4e..829e59dd4 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -1305,7 +1305,7 @@ static int cmd_enable_channel_internal(struct ltt_session *session, attr = lttng_channel_copy(_attr); if (!attr) { - ret = -LTTNG_ERR_NOMEM; + ret = LTTNG_ERR_NOMEM; goto end; } @@ -2866,7 +2866,7 @@ int cmd_start_trace(struct ltt_session *session) */ session->rotated_after_last_stop = false; - if (session->rotate_timer_period) { + if (session->rotate_timer_period && !session->rotation_schedule_timer_enabled) { int int_ret = timer_session_rotation_schedule_timer_start( session, session->rotate_timer_period); @@ -3805,6 +3805,7 @@ enum lttng_error_code cmd_list_channels(enum lttng_domain_type domain, extended->lost_packets = lost_packets; ret = lttng_channel_serialize(channel, buffer); + lttng_channel_destroy(channel); if (ret) { ret = -1; break;