Skip to content

dix: Clear device sprite after free in AttachDevice()

The code in AttachDevice() may free the dev->spriteInfo->sprite under some circumstances and later call GetCurrentRootWindow() which uses the same dev->spriteInfo->sprite.

While it seems unlikely that this is actually an issue, considering the cases where one or the other get called, it still makes the code look suspicious.

Make sure to clear set dev->spriteInfo->sprite to NULL immediately after it's freed to avoid any confusion, even if only to clarify the code.

Signed-off-by: Olivier Fourdan Closes: #1436 (closed)

Merge request reports