]> git.lizzy.rs Git - bspwm.git/commitdiff
Fix memory leak in register_events
authorJustinien Bouron <justinien.bouron@epfl.ch>
Fri, 2 Jun 2017 19:27:06 +0000 (21:27 +0200)
committerBastien Dejean <nihilhill@gmail.com>
Sat, 3 Jun 2017 19:18:24 +0000 (21:18 +0200)
src/bspwm.c

index 449c9169d092546a524227bec988c85592ce4458..41735e88313f2c1aaf9dd4c2dbc710166a0963c1 100644 (file)
@@ -337,6 +337,9 @@ void register_events(void)
        uint32_t values[] = {ROOT_EVENT_MASK};
        xcb_generic_error_t *e = xcb_request_check(dpy, xcb_change_window_attributes_checked(dpy, root, XCB_CW_EVENT_MASK, values));
        if (e != NULL) {
+               free(e);
+               xcb_ewmh_connection_wipe(ewmh);
+               free(ewmh);
                xcb_disconnect(dpy);
                err("Another window manager is already running.\n");
        }