modesetting: call xf86_cursors_fini during CloseScreen

Add matching call for xf86_cursors_init to clean memory, as during
initialization it allocates memory (depends, but is something like ~256Kb)
and it leaks when XServer resets.

Signed-off-by: Tautvis <gtautvis@gmail.com>
This commit is contained in:
Tautvis
2025-11-04 01:45:34 +02:00
committed by Enrico Weigelt
parent 3dbeda9909
commit 7fa05a8760

View File

@@ -2183,6 +2183,10 @@ CloseScreen(ScreenPtr pScreen)
ms->drmmode.shadow_fb2 = NULL;
}
if (!ms->drmmode.sw_cursor) {
xf86_cursors_fini(pScreen);
}
drmmode_uevent_fini(pScrn, &ms->drmmode);
drmmode_free_bos(pScrn, &ms->drmmode);