diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-10-21 13:22:52 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-10-21 13:46:07 +0200 |
commit | 2e0a945d3d2bc6ea795e7148311c07c1073053b1 (patch) | |
tree | 4e0a284d2967070cbf011ddae7849a823bf09691 /src | |
parent | e8e4322bc91ba8e2591d128dce01b00406dc0aa2 (diff) |
vty.c: Set vty->fd to -1 after closing the FD
Change-Id: I07d105f4a810dd809fbf6feb5c04e7410020c887
Diffstat (limited to 'src')
-rw-r--r-- | src/vty/vty.c | 4 |
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); |