Fixed XCloseDisplay() which is not reached in keyboard_indicators()
authorAaron Marcher <info@nulltime.net>
Mon, 23 Jan 2017 20:01:41 +0000 (21:01 +0100)
committerAaron Marcher <info@nulltime.net>
Mon, 23 Jan 2017 20:01:41 +0000 (21:01 +0100)
slstatus.c

index d29436db7ee58575f1d2e3fbd649940bf400e452..53e19462596e627fb1023e6f319261ce0f8cab1d 100644 (file)
@@ -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 *