summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vty/telnet_interface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c
index 0ccf8dc6..fdd88c1f 100644
--- a/src/vty/telnet_interface.c
+++ b/src/vty/telnet_interface.c
@@ -177,7 +177,7 @@ static int telnet_new_connection(struct osmo_fd *fd, unsigned int what)
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;
}