mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-15 00:13:28 +00:00
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:
parent
a80b1f888f
commit
cdeb2c23f8
3 changed files with 19 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue