xserver/render glyph.c,1.9,1.10

David Reveman xserver-commit at pdx.freedesktop.org
Mon Mar 7 23:58:41 PST 2005


Committed by: davidr

Update of /cvs/xserver/xserver/render
In directory gabe:/tmp/cvs-serv10434/render

Modified Files:
	glyph.c 
Log Message:
Fix memory leak of glyph privates

Index: glyph.c
===================================================================
RCS file: /cvs/xserver/xserver/render/glyph.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- glyph.c	2 Mar 2005 15:30:03 -0000	1.9
+++ glyph.c	8 Mar 2005 07:58:39 -0000	1.10
@@ -513,6 +513,17 @@
     gr = FindGlyphRef (&globalGlyphs[glyphSet->fdepth], hash, TRUE, glyph);
     if (gr->glyph && gr->glyph != DeletedGlyph)
     {
+	PictureScreenPtr ps;
+	int              i;
+	
+	for (i = 0; i < screenInfo.numScreens; i++)
+	{
+	    ps = GetPictureScreenIfSet (screenInfo.screens[i]);
+	    if (ps)
+		(*ps->UnrealizeGlyph) (screenInfo.screens[i], glyph);
+	}
+	if (glyph->devPrivates)
+	    xfree (glyph->devPrivates);
 	xfree (glyph);
 	glyph = gr->glyph;
     }



More information about the xserver-commit mailing list