Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/11417


Change subject: vty.c: Set vty->fd to -1 after closing the FD
......................................................................

vty.c: Set vty->fd to -1 after closing the FD

Change-Id: I07d105f4a810dd809fbf6feb5c04e7410020c887
---
M src/vty/vty.c
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/11417/1

diff --git a/src/vty/vty.c b/src/vty/vty.c
index ad53537..70f6811 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -221,8 +221,10 @@
        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);

--
To view, visit https://gerrit.osmocom.org/11417
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I07d105f4a810dd809fbf6feb5c04e7410020c887
Gerrit-Change-Number: 11417
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>

Reply via email to