aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty/vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vty/vty.c')
-rw-r--r--src/vty/vty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vty/vty.c b/src/vty/vty.c
index ad535371..70f6811a 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -221,8 +221,10 @@ void vty_close(struct vty *vty)
vector_unset(vtyvec, vty->fd);
/* Close socket. */
- if (vty->fd > 0)
+ if (vty->fd > 0) {
close(vty->fd);
+ vty->fd = -1;
+ }
if (vty->buf) {
talloc_free(vty->buf);