Fix: relayd: unchecked return values
[lttng-tools.git] / src / bin / lttng-relayd / live.c
index 88bb7363db962a41e65c8ccff4a6a654cbc666a3..74c28a45784a1962aa9c068a63cccf9461f5a600 100644 (file)
@@ -2055,8 +2055,13 @@ restart:
                                        if (ret < 0) {
                                                goto error;
                                        }
-                                       lttng_poll_add(&events, conn->sock->fd,
+                                       ret = lttng_poll_add(&events,
+                                                       conn->sock->fd,
                                                        LPOLLIN | LPOLLRDHUP);
+                                       if (ret) {
+                                               ERR("Failed to add new live connection file descriptor to poll set");
+                                               goto error;
+                                       }
                                        connection_ht_add(viewer_connections_ht, conn);
                                        DBG("Connection socket %d added to poll", conn->sock->fd);
                                } else if (revents & (LPOLLERR | LPOLLHUP | LPOLLRDHUP)) {
This page took 0.023193 seconds and 4 git commands to generate.