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:
Brendan King 2014-04-24 11:37:46 +01:00 committed by Keith Packard
parent 444a1f7a88
commit a99c061aaf
1 changed files with 1 additions and 1 deletions

View File

@ -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);