[PATCH 1/4] dix: Update element count in FreeResourceByType()

Adam Jackson ajax at nwnk.net
Mon May 3 08:09:22 PDT 2010


On Sun, 2010-05-02 at 16:48 -0700, Keith Packard wrote:
> On Sun, 2 May 2010 17:26:58 -0400, Kristian Høgsberg <krh at bitplanet.net> wrote:
> > I guess they don't do it either... bad assumption on my part.  But it
> > *is* a bug, right?  I can fix those too and resend, but I'm just still
> > surprised that this bug was in there all the time and not sure if
> > instead I'm missing something subtle in the resource code.
> 
> FreeResourceByType was added for X11R4 with this bug in place, long
> after the authors of the resource code were gone, so I suspect the whole
> 'elements' invariant was lost. I'd love to know why it was added then;
> the server didn't use it at all then, and the core code still does not.

Incorrect:

atropine:/tmp/r4/mit% grep FreeResourceByType **/*.[ch]
extensions/server/multibuf.c:    FreeResourceByType (pWin->drawable.id, MultibuffersResType, FALSE);
server/dix/resource.c:FreeResourceByType(id, type, skipFree)

Which makes sense; destroying a window should destroy all the image
buffers bound to it.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100503/1386128a/attachment.pgp>


More information about the xorg-devel mailing list