diff options
author | Keith Packard <keithp@keithp.com> | 2017-05-17 09:57:29 -0700 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2017-06-16 11:48:55 +0200 |
commit | 2b84bc463aefb5ed40c999ee0eb24b34376819f2 (patch) | |
tree | f5e54041428c6ed917f28644e040589bd6ccaed6 | |
parent | 6dec116a58dd58da941d44d75c3e5a4a52f4ec29 (diff) |
os: Set oc->fd to -1 when connection is closedserver-1.19-backports
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>
(cherry picked from commit f3689f637f5ac0fb6c231a470e65b39aa5e9ba20)
-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; } } |