dix: free the unused device classes when closing a device.
This also requires to NULL-ify all pointers while we're actually using them, otherwise we'd try to free them twice.
This commit is contained in:
@@ -775,6 +775,13 @@ CloseDevice(DeviceIntPtr dev)
|
||||
classes = (ClassesPtr)&dev->key;
|
||||
FreeAllDeviceClasses(classes);
|
||||
|
||||
if (dev->isMaster)
|
||||
{
|
||||
classes = dixLookupPrivate(&dev->devPrivates, UnusedClassesPrivateKey);
|
||||
FreeAllDeviceClasses(classes);
|
||||
}
|
||||
|
||||
|
||||
#ifdef XKB
|
||||
while (dev->xkb_interest)
|
||||
XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource);
|
||||
|
||||
Reference in New Issue
Block a user