aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/os
diff options
context:
space:
mode:
authorPauli Nieminen <ext-pauli.nieminen@nokia.com>2017-02-16 10:28:32 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-21 10:33:30 +0100
commit6c076cfe5a656b03d4bd0dd9742e7a02dce2b957 (patch)
treeb6e457294b9586c3092c1cc0e870207d19e5a5c7 /nx-X11/programs/Xserver/os
parent8996f80a5e3b205cb580aba34aa21d165ef78cfb (diff)
downloadnx-libs-6c076cfe5a656b03d4bd0dd9742e7a02dce2b957.tar.gz
nx-libs-6c076cfe5a656b03d4bd0dd9742e7a02dce2b957.tar.bz2
nx-libs-6c076cfe5a656b03d4bd0dd9742e7a02dce2b957.zip
os: Fix a memory leak
Backported from X.org (+ coding style fixes in other free() calls): commit 617b7d22115ccaaaa7ec69c99885054d33a3bc37 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:42 2010 +0200 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> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/os')
-rw-r--r--nx-X11/programs/Xserver/os/access.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/os/access.c b/nx-X11/programs/Xserver/os/access.c
index 152287889..d745bde3a 100644
--- a/nx-X11/programs/Xserver/os/access.c
+++ b/nx-X11/programs/Xserver/os/access.c
@@ -1240,20 +1240,22 @@ Bool LocalClient(ClientPtr client)
&alen, (void **)&addr);
if (family == -1)
{
- free ((char *) from);
+ free(from);
return FALSE;
}
if (family == FamilyLocal)
{
- free ((char *) from);
+ free(from);
return TRUE;
}
for (host = selfhosts; host; host = host->next)
{
- if (addrEqual (family, addr, alen, host))
+ if (addrEqual (family, addr, alen, host)) {
+ free(from);
return TRUE;
+ }
}
- free ((char *) from);
+ free(from);
}
return FALSE;
}