aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/os')
-rw-r--r--xorg-server/os/access.c2
-rw-r--r--xorg-server/os/connection.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c
index 28f2d3213..8fa028eb4 100644
--- a/xorg-server/os/access.c
+++ b/xorg-server/os/access.c
@@ -1392,7 +1392,7 @@ InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client)
}
for (host = validhosts; host; host = host->next) {
if (host->family == FamilyServerInterpreted) {
- if (addr && siAddrMatch(family, addr, len, host, client)) {
+ if (siAddrMatch(family, addr, len, host, client)) {
return 0;
}
}
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c
index ddfe50a3e..7ff44e175 100644
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -513,8 +513,13 @@ CloseWellKnownConnections(void)
{
int i;
- for (i = 0; i < ListenTransCount; i++)
- _XSERVTransClose(ListenTransConns[i]);
+ for (i = 0; i < ListenTransCount; i++) {
+ if (ListenTransConns[i] != NULL) {
+ _XSERVTransClose(ListenTransConns[i]);
+ ListenTransConns[i] = NULL;
+ }
+ }
+ ListenTransCount = 0;
}
static void