Hi,

On Wed, Mar 09, 2011 at 05:29:14PM +0200, Erkki Seppälä wrote:
> The record allocated by miSpriteDeviceCursorInitialize was not being
> released.
> 
> This patch makes misprite use dixRegisterPrivateKey with the record
> size argument, which handles the memory management
> issues. miSpriteDeviceCursorInitialize is restructured to initialize
> pCursorInfo only if miDCDeviceInitialize succeeds. The record itself
> is zeroed on cleanup to ensure that the assumptions in the code still
> hold.
> 
> Reviewed-by: Rami Ylimäki <rami.ylim...@vincit.fi>
> Signed-off-by: Erkki Seppälä <erkki.sepp...@vincit.fi>

Looks fine to me.  miSpriteDeviceCursorInitialize gets called as
spriteFuncs->DeviceCursorInitialize from miPointerDeviceInitialize,
which gets called as pScreen->DeviceCursorInitialize from
ActivateDevice.

Similarly, miSpriteDeviceCursorCleanup only gets called after a
DEVICE_CLOSE from CloseDevice(), and we shouldn't get any more events
after that; AccelCleanupProc doesn't post any events either, just, er,
cleans up.

So this looks fine to me.  Thanks! There are many other potential fixes
just like this one lurking in misprite.c and mipointer.c if that
horrible mess hasn't scared you off yet.

Reviewed-by: Daniel Stone <dan...@fooishbar.org>

Cheers,
Daniel

Attachment: signature.asc
Description: Digital signature

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to