From: Mathieu Desnoyers Date: Tue, 17 May 2016 16:13:13 +0000 (-0400) Subject: Fix: unchecked return value in relayd live.c X-Git-Tag: v2.7.3~35 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a9aa7c779a710ec3bfbd5e34fafd24623ccda067;p=lttng-tools.git Fix: unchecked return value in relayd live.c CID 1323137 (#1 of 1): Unchecked return value (CHECKED_RETURN)30. check_return: Calling viewer_stream_get without checking return value (as is done elsewhere 5 out of 6 times). Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c index 06eba74d7..45ac5d55f 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -341,7 +341,10 @@ int make_viewer_streams(struct relay_session *session, * Ensure a self-reference is preserved even * after we have put our local reference. */ - viewer_stream_get(vstream); + if (!viewer_stream_get(vstream)) { + ERR("Unable to get self-reference on viewer stream, logic error."); + abort(); + } } else { if (!vstream->sent_flag && nb_unsent) { /* Update number of unsent stream counter. */