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.12.0-rc1~501 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=2fdaeb7e6ba9952cc083027fbe591fd6b69cbe80;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;