0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-19 20:32:15 +02:00

libobs-opengl: Close display when destroying X11/EGL platform

Currently, the X11 display may be leaked when the X11/EGL
platform is destroyed. Fix that by calling XCloseDisplay()
to free it.

Fixes: 2fd8a6df55 ("libobs-opengl: Introduce the X11/EGL winsys")
This commit is contained in:
Barnabás Pőcze 2023-01-21 05:13:47 +01:00 committed by Ryan Foster
parent dee7ef8512
commit 8e96d47cd3

View File

@ -385,6 +385,8 @@ static void gl_x11_egl_platform_destroy(struct gl_platform *plat)
gl_context_destroy(plat);
eglTerminate(plat->edisplay);
if (plat->close_xdisplay)
XCloseDisplay(plat->xdisplay);
bfree(plat);
}