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>
This commit is contained in:
parent
d05c754e1b
commit
f3689f637f
|
@ -772,6 +772,7 @@ CloseDownFileDescriptor(OsCommPtr oc)
|
||||||
_XSERVTransDisconnect(oc->trans_conn);
|
_XSERVTransDisconnect(oc->trans_conn);
|
||||||
_XSERVTransClose(oc->trans_conn);
|
_XSERVTransClose(oc->trans_conn);
|
||||||
oc->trans_conn = NULL;
|
oc->trans_conn = NULL;
|
||||||
|
oc->fd = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue