From b11dd2db0ebfc0b20ef2d5a972f13cf39bdd0b31 Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Mon, 23 Jan 2017 21:01:41 +0100 Subject: Fixed XCloseDisplay() which is not reached in keyboard_indicators() --- slstatus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'slstatus.c') diff --git a/slstatus.c b/slstatus.c index d29436d..53e1946 100644 --- a/slstatus.c +++ b/slstatus.c @@ -329,6 +329,7 @@ keyboard_indicators(void) Display *dpy = XOpenDisplay(NULL); XKeyboardState state; XGetKeyboardControl(dpy, &state); + XCloseDisplay(dpy); switch (state.led_mask) { case 1: @@ -343,8 +344,6 @@ keyboard_indicators(void) default: return smprintf(""); } - - XCloseDisplay(dpy); } static char * -- cgit v1.2.3