diff --git a/xcb.c b/xcb.c index 27a8dae..280be55 100644 --- a/xcb.c +++ b/xcb.c @@ -203,6 +203,9 @@ bool grab_pointer_and_keyboard(xcb_connection_t *conn, xcb_screen_t *screen, xcb break; } + /* In case the grab failed, we still need to free the reply */ + free(preply); + /* Make this quite a bit slower */ usleep(50); @@ -237,6 +240,9 @@ bool grab_pointer_and_keyboard(xcb_connection_t *conn, xcb_screen_t *screen, xcb break; } + /* In case the grab failed, we still need to free the reply */ + free(kreply); + /* Make this quite a bit slower */ usleep(50);