浏览代码

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: 2fd8a6df557766 ("libobs-opengl: Introduce the X11/EGL winsys")
Barnabás Pőcze 2 年之前
父节点
当前提交
8e96d47cd3
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      libobs-opengl/gl-x11-egl.c

+ 2 - 0
libobs-opengl/gl-x11-egl.c

@@ -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);
 }