mirror of https://gerrit.osmocom.org/libosmocore
vty.c: Set vty->fd to -1 after closing the FD
Change-Id: I07d105f4a810dd809fbf6feb5c04e7410020c887
This commit is contained in:
parent
e8e4322bc9
commit
2e0a945d3d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue