Commit 6c076cfe authored by Pauli Nieminen's avatar Pauli Nieminen Committed by Mike Gabriel

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: 's avatarPauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: 's avatarDaniel Stone <daniel@fooishbar.org> Backported-to-NX-by: 's avatarMike Gabriel <mike.gabriel@das-netzwerkteam.de>
parent 8996f80a
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment