From 5810571e53238d11aa3beda33a770fe44e98749a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sat, 21 Jan 2023 05:00:58 +0100 Subject: [PATCH] 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") --- libobs/obs-nix-x11.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libobs/obs-nix-x11.c b/libobs/obs-nix-x11.c index ce571b977..a60048a5f 100644 --- a/libobs/obs-nix-x11.c +++ b/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;