]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Check fr_event_fd_insert() return value. CID #1469154 (#4461)
authorJames Jones <jejones3141@gmail.com>
Thu, 21 Apr 2022 19:18:38 +0000 (14:18 -0500)
committerGitHub <noreply@github.com>
Thu, 21 Apr 2022 19:18:38 +0000 (15:18 -0400)
src/lib/server/trunk_tests.c

index 8a9bc4c1b3749a93f58de9f683f10e50ebebc834..048cfd623b4a6d877dd83f3263dce215c2ad27f9 100644 (file)
@@ -167,15 +167,15 @@ static void _conn_notify(fr_trunk_connection_t *tconn, fr_connection_t *conn,
                break;
 
        case FR_TRUNK_CONN_EVENT_READ:
-               fr_event_fd_insert(conn, el, fd, _conn_io_read, NULL, _conn_io_error, tconn);
+               TEST_CHECK(fr_event_fd_insert(conn, el, fd, _conn_io_read, NULL, _conn_io_error, tconn) == 0);
                break;
 
        case FR_TRUNK_CONN_EVENT_WRITE:
-               fr_event_fd_insert(conn, el, fd, NULL, _conn_io_write, _conn_io_error, tconn);
+               TEST_CHECK(fr_event_fd_insert(conn, el, fd, NULL, _conn_io_write, _conn_io_error, tconn) == 0);
                break;
 
        case FR_TRUNK_CONN_EVENT_BOTH:
-               fr_event_fd_insert(conn, el, fd, _conn_io_read, _conn_io_write, _conn_io_error, tconn);
+               TEST_CHECK(fr_event_fd_insert(conn, el, fd, _conn_io_read, _conn_io_write, _conn_io_error, tconn) == 0);
                break;
 
        default: