summaryrefslogtreecommitdiff
path: root/lib/vty.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-11-19 07:02:15 -0500
committerDonald Sharp <sharpd@nvidia.com>2020-11-19 07:02:15 -0500
commit07d4bb8b9c6c180abaddd168f7a63f4f022a7262 (patch)
tree86fe1b87ce56fba25cc4d1e484a9f35007d0758c /lib/vty.c
parent53a85efa514b88be08c29dfe539612e58f2d2fb3 (diff)
lib: Stop socket from leaking.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/vty.c')
-rw-r--r--lib/vty.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/vty.c b/lib/vty.c
index 1eb4171630..21b3d47b09 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1811,6 +1811,7 @@ static int vty_accept(struct thread *thread)
set_cloexec(vty_sock);
if (!sockunion2hostprefix(&su, &p)) {
+ close(vty_sock);
zlog_info("Vty unable to convert prefix from sockunion %s",
sockunion2str(&su, buf, SU_ADDRSTRLEN));
return -1;