From: Jérémie Galarneau Date: Wed, 21 Aug 2019 22:24:12 +0000 (-0700) Subject: Fix: uninitialized variable returned by relay_rotate_session_streams X-Git-Tag: v2.11.0-rc3~69 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9be27ca776aa87e7eb44d0347b9e5100495ba432;p=lttng-tools.git Fix: uninitialized variable returned by relay_rotate_session_streams `ret` can be returned uninitialized when relay_rotate_session_streams succeeds. Initialize it to 0 on the successful code path. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 1cbebdcf2..8fe3dd96d 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -2252,6 +2252,7 @@ end: ret = -1; } + ret = 0; end_no_reply: lttng_trace_chunk_put(next_trace_chunk); return ret;