Xvfb and others don't overwrite DeleteInputDeviceRequest, so call RemoveDevice() for them to ensure proper cleanup of the devices. This fixes a few memory leaks caused by the XTest devices not being cleaned up.
==5712== 1 bytes in 1 blocks are still reachable in loss record 2 of 585 ==5712== at 0x4A074CD: malloc (vg_replace_malloc.c:236) ==5712== by 0x55B716: XIChangeDeviceProperty (xiproperty.c:754) ==5712== by 0x4BAAC0: AllocXTestDevice (xtest.c:627) ==5712== by 0x4BA82E: InitXTestDevices (xtest.c:570) ==5712== by 0x425F1A: InitCoreDevices (devices.c:690) ==5712== by 0x5ACA05: main (main.c:257) Signed-off-by: Peter Hutterer <[email protected]> --- Xi/stubs.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Xi/stubs.c b/Xi/stubs.c index 6a4c181..8498d5f 100644 --- a/Xi/stubs.c +++ b/Xi/stubs.c @@ -143,4 +143,5 @@ NewInputDeviceRequest(InputOption *options, InputAttributes *attrs, void DeleteInputDeviceRequest(DeviceIntPtr dev) { + RemoveDevice(dev, TRUE); } -- 1.7.7.6 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
