Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11416 )

Change subject: telnet_interface: avoid double-close of fd()
......................................................................

telnet_interface: avoid double-close of fd()

Change-Id: Ibd81f29fa22d53553bd73c055d6a1f5255a69bad
Fixes: Coverity CID#135238
---
M src/vty/telnet_interface.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c
index 0ccf8dc..fdd88c1 100644
--- a/src/vty/telnet_interface.c
+++ b/src/vty/telnet_interface.c
@@ -177,7 +177,7 @@
        connection->vty = vty_create(new_connection, connection);
        if (!connection->vty) {
                LOGP(0, LOGL_ERROR, "couldn't create VTY\n");
-               close(new_connection);
+               /* vty_create() is already closing the fd if it returns NULL */
                talloc_free(connection);
                return -1;
        }

--
To view, visit https://gerrit.osmocom.org/11416
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd81f29fa22d53553bd73c055d6a1f5255a69bad
Gerrit-Change-Number: 11416
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)

Reply via email to