瀏覽代碼

libobs: Close display when destroying X11 hotkey platform

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

Fixes: bcb04bb80010fb ("libobs: Open a separate X11 connection for hotkeys")
Barnabás Pőcze 2 年之前
父節點
當前提交
5810571e53
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      libobs/obs-nix-x11.c

+ 1 - 0
libobs/obs-nix-x11.c

@@ -878,6 +878,7 @@ static void obs_nix_x11_hotkeys_platform_free(struct obs_core_hotkeys *hotkeys)
 		da_free(context->keycodes[i].list);
 
 	bfree(context->keysyms);
+	XCloseDisplay(context->display);
 	bfree(context);
 
 	hotkeys->platform_context = NULL;