diff options
author | Keith Packard <keithp@keithp.com> | 2017-05-17 09:57:29 -0700 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2017-06-13 09:56:44 -0400 |
commit | f3689f637f5ac0fb6c231a470e65b39aa5e9ba20 (patch) | |
tree | 5de6c0bbed54c0f6be87629f25187784899626a0 /os | |
parent | d05c754e1bde895589fb514d8f518afeccecbc05 (diff) |
os: Set oc->fd to -1 when connection is closed
This ensures that we don't use the now-closed file descriptor in the
future.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'os')
-rw-r--r-- | os/connection.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/os/connection.c b/os/connection.c index 07c16eacf..229bbe745 100644 --- a/os/connection.c +++ b/os/connection.c @@ -772,6 +772,7 @@ CloseDownFileDescriptor(OsCommPtr oc) _XSERVTransDisconnect(oc->trans_conn); _XSERVTransClose(oc->trans_conn); oc->trans_conn = NULL; + oc->fd = -1; } } |