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>
Fri, 20 May 2016 20:39:24 +0000 (16:39 -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 6dd2d12babdce0d7182f36fafb64825af09c19e5..f9f0d0429edb23fb633043b65b4e5c760067c15e 100644 (file)
@@ -340,7 +340,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.02873 seconds and 4 git commands to generate.