Fix cursor ref counting mistakes with sprites and xf86Cursor.c
A few cursor value assignments weren't getting correctly ref counted, causing leaks of cursor objects. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
@@ -851,6 +851,8 @@ CloseDevice(DeviceIntPtr dev)
|
||||
}
|
||||
|
||||
if (DevHasCursor(dev) && dev->spriteInfo->sprite) {
|
||||
if (dev->spriteInfo->sprite->current)
|
||||
FreeCursor(dev->spriteInfo->sprite->current, None);
|
||||
xfree(dev->spriteInfo->sprite->spriteTrace);
|
||||
xfree(dev->spriteInfo->sprite);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user