|
Description
|
This X.Org upstream patch should be incorporated into the Solaris builds of Xorg 7.2:
Date: Thu, 15 Feb 2007 17:09:00 +0000 (+0200)
Subject: os: fix client privates leak
X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=811675733e97416c990e6dc9c19271b43d96248d
os: fix client privates leak
Minor leak here. Oops.
---
--- a/os/connection.c
+++ b/os/connection.c
@@ -1066,6 +1066,8 @@ CloseDownConnection(ClientPtr client)
XdmcpCloseDisplay(oc->fd);
#endif
CloseDownFileDescriptor(oc);
+ FreeOsBuffers(oc);
+ xfree(client->osPrivate);
client->osPrivate = (pointer)NULL;
if (auditTrailLevel > 1)
AuditF("client %d disconnected\n", client->index);
*** Test Case ***
Requires machine configured to run Xorg
Stop dtlogin/gdm/X on console.
Run the following script (also saved as an attachment to this bug report).
Before this fix it should report several memory leaks from EstablishNewConnections,
with this fix in place it should report 0 memory leaks from EstablishNewConnections.
#!/bin/ksh
cd /tmp
PATH=/usr/X11/bin:/usr/openwin/bin:$PATH ; export PATH
LD_PRELOAD=libumem.so UMEM_DEBUG=default \
xinit /usr/openwin/bin/xlogo -- /usr/X11/bin/Xorg :0 >> Xorg.out.$$ 2>&1 &
DISPLAY=:0 ; export DISPLAY
sleep 5
i=0
while [ $i -lt 10 ] ; do
xdpyinfo >> /dev/null
i=$(($i+1))
done
Xpid=$(pgrep Xorg)
gcore -o Xorg.core $Xpid
kill $Xpid
mdb_output=mdb.out.$$
mdb Xorg.core.$Xpid > $mdb_output 2>&1 <<EOF
::findleaks -d
EOF
connleaks=$( grep -c EstablishNewConnections $mdb_output )
echo "$connleaks leaks from EstablishNewConnections"
rm Xorg.core.$Xpid Xorg.out.$$ mdb.out.$$
|