summaryrefslogtreecommitdiff
path: root/dix/events.c
diff options
context:
space:
mode:
authorBrendan King <brendan.king@imgtec.com>2014-04-24 11:37:46 +0100
committerKeith Packard <keithp@keithp.com>2014-06-04 21:32:14 -0700
commita99c061aafd4aaa5728c776dca7d0a1789ac739a (patch)
tree47f8eb63a09b1fed696c6095c4bceff18bed3963 /dix/events.c
parent444a1f7a8802999e27ecf5f6eb598df2206f7277 (diff)
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>
Diffstat (limited to 'dix/events.c')
-rw-r--r--dix/events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dix/events.c b/dix/events.c
index 7e7a1c9eb..b8c67fdfc 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -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);