summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli Nieminen <ext-pauli.nieminen@nokia.com>2010-12-30 19:19:42 +0200
committerAdam Jackson <ajax@redhat.com>2011-01-06 15:16:28 -0500
commitdc24f90ddc9c116a31347ba961f19feaf63fa843 (patch)
tree15357562e4fe6300d48749d1f2726b87e4dc15c5
parenta87a5b7e83349d3871fcde71fec08f85fa16dc0b (diff)
os: Fix a memory leak
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> (cherry picked from commit 617b7d22115ccaaaa7ec69c99885054d33a3bc37)
-rw-r--r--os/access.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/os/access.c b/os/access.c
index 027925927..eb91ea35e 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1145,8 +1145,10 @@ Bool LocalClient(ClientPtr client)
}
for (host = selfhosts; host; host = host->next)
{
- if (addrEqual (family, addr, alen, host))
+ if (addrEqual (family, addr, alen, host)) {
+ free(from);
return TRUE;
+ }
}
free(from);
}