[Xquartz-changes] xserver: Branch 'master' - 2 commits
Jeremy Huddleston
jeremyhu at freedesktop.org
Wed Nov 4 11:32:00 PST 2009
dix/cursor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 7442f3355ab8f0bb2b1a270da18c65d8d315d4dd
Merge: 0573042... 7897b6c...
Author: Keith Packard <keithp at keithp.com>
Date: Wed Nov 4 08:55:20 2009 -0800
Merge remote branch 'jeremyhu/master'
commit 0573042cddb6f9942e408687a16c6842e62a8bfa
Author: Rami Ylimaki <ext-rami.ylimaki at nokia.com>
Date: Wed Nov 4 15:59:30 2009 +0200
dix: Fixes a memory leak when a cursor resource is released.
Just open and close a client that creates cursors in order to
reproduce. In the problem case bits->refcnt is -1 and therefore
bits->devPrivates is never released.
Signed-off-by: Rami Ylimaki <ext-rami.ylimaki at nokia.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/dix/cursor.c b/dix/cursor.c
index 086d008..6103b15 100644
--- a/dix/cursor.c
+++ b/dix/cursor.c
@@ -86,6 +86,8 @@ FreeCursorBits(CursorBitsPtr bits)
#ifdef ARGB_CURSOR
xfree(bits->argb);
#endif
+ dixFreePrivates(bits->devPrivates);
+ bits->devPrivates = NULL;
if (bits->refcnt == 0)
{
GlyphSharePtr *prev, this;
@@ -100,7 +102,6 @@ FreeCursorBits(CursorBitsPtr bits)
CloseFont(this->font, (Font)0);
xfree(this);
}
- dixFreePrivates(bits->devPrivates);
xfree(bits);
}
}
More information about the Xquartz-changes
mailing list