Change in libosmocore[master]: telnet_interface: avoid double-close of fd()

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.org
Sun Oct 21 12:11:00 UTC 2018


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 <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181021/0e62ee96/attachment.htm>


More information about the gerrit-log mailing list