os/access: fix regression in server interpreted auth

This was reported on irc on Fedora when rawhide went to 1.17.1.

regression occured in: 2566835b43
 os: Eliminate uninitialized value warnings from access.c

siAddrMatch doesn't need addr to be a useful value, it checks
some things like localuser without having an address at all.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 9d9bd38fe1)
This commit is contained in:
Dave Airlie 2015-02-17 14:40:27 +10:00 committed by Adam Jackson
parent 7a45d1684f
commit 650a1fd274

View file

@ -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;
}
}