This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. Change subject: telnet_interface: Handle osmo_fd_register() eror return code ...................................................................... telnet_interface: Handle osmo_fd_register() eror return code Change-Id: I5bc1c2cbb04e363d868355b5ed866b4840f16c61 Fixes: Coverity 57637 --- M src/vty/telnet_interface.c 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c index e86a6b1..218f9ab 100644 --- a/src/vty/telnet_interface.c +++ b/src/vty/telnet_interface.c @@ -145,6 +145,7 @@ struct sockaddr_in sockaddr; socklen_t len = sizeof(sockaddr); int new_connection = accept(fd->fd, (struct sockaddr*)&sockaddr, &len); + int rc; if (new_connection < 0) { LOGP(0, LOGL_ERROR, "telnet accept failed\n"); @@ -157,7 +158,11 @@ connection->fd.fd = new_connection; connection->fd.when = BSC_FD_READ; connection->fd.cb = client_data; - osmo_fd_register(&connection->fd); + rc = osmo_fd_register(&connection->fd); + if (rc < 0) { + talloc_free(connection); + return rc; + } llist_add_tail(&connection->entry, &active_connections); connection->vty = vty_create(new_connection, connection); -- To view, visit https://gerrit.osmocom.org/1283 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5bc1c2cbb04e363d868355b5ed866b4840f16c61 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder