dix: reference the cursor just once in InitializeSprite()
The new current cursor was being referenced twice, resulting in a memory leak when the current server generation ended. Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
444a1f7a88
commit
a99c061aaf
|
@ -3237,7 +3237,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin)
|
|||
pCursor = RefCursor(pCursor);
|
||||
if (pSprite->current)
|
||||
FreeCursor(pSprite->current, None);
|
||||
pSprite->current = RefCursor(pCursor);
|
||||
pSprite->current = pCursor;
|
||||
|
||||
if (pScreen) {
|
||||
(*pScreen->RealizeCursor) (pDev, pScreen, pSprite->current);
|
||||
|
|
Loading…
Reference in New Issue