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.8.0~37 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c03025c98ba11fe3ed1778655ae660514c92eb58;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 78ea95cc2..e2096eccd 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -339,7 +339,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. */