Fix: unchecked return value in relayd live.c
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 17 May 2016 16:13:13 +0000 (12:13 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 May 2016 05:38:34 +0000 (01:38 -0400)
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 <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/live.c

index 78ea95cc247652185e5ab0fc218c259458e629c6..e2096eccd3897b5a500ebaabbe8ea5ecfac1cd90 100644 (file)
@@ -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. */
This page took 0.026832 seconds and 4 git commands to generate.