1
0
Fork 0
mirror of https://github.com/Raymo111/i3lock-color.git synced 2024-12-02 14:05:43 -05:00

Fix memory leak when grabbing fails

This commit is contained in:
Karl Tarbe 2018-03-07 00:53:24 +02:00 committed by Karl Tarbe
parent bcbfee0a17
commit 1668b2fc0f

6
xcb.c
View file

@ -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);