Skip to content

Commit 7fa05a8

Browse files
cepelinas9000metux
authored andcommitted
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 <[email protected]>
1 parent 3dbeda9 commit 7fa05a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hw/xfree86/drivers/modesetting/driver.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2183,6 +2183,10 @@ CloseScreen(ScreenPtr pScreen)
21832183
ms->drmmode.shadow_fb2 = NULL;
21842184
}
21852185

2186+
if (!ms->drmmode.sw_cursor) {
2187+
xf86_cursors_fini(pScreen);
2188+
}
2189+
21862190
drmmode_uevent_fini(pScrn, &ms->drmmode);
21872191

21882192
drmmode_free_bos(pScrn, &ms->drmmode);

0 commit comments

Comments
 (0)