dix: devices: fix missing free in AddInputDevice()

When dixCallDeviceAccessCallback() rejects, we need to really clean up.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2026-04-30 16:52:26 +02:00 • committed by Enrico Weigelt
commit 2b82880694

View file

@ -304,6 +304,7 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
*/
if (XaceHookDeviceAccess(client, dev, DixCreateAccess)) {
dixFreePrivates(dev->devPrivates, PRIVATE_DEVICE);
free(dev->deviceGrab.sync.event);
free(dev);
return NULL;
}