Browse Source
Merge pull request #179 from karulont/master
Fix memory leak when grabbing fails
master
Ingo Bürk
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
0 deletions
-
xcb.c
|
@ -203,6 +203,9 @@ bool grab_pointer_and_keyboard(xcb_connection_t *conn, xcb_screen_t *screen, xcb |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* In case the grab failed, we still need to free the reply */ |
|
|
|
|
|
free(preply); |
|
|
|
|
|
|
|
|
/* Make this quite a bit slower */ |
|
|
/* Make this quite a bit slower */ |
|
|
usleep(50); |
|
|
usleep(50); |
|
|
|
|
|
|
|
@ -237,6 +240,9 @@ bool grab_pointer_and_keyboard(xcb_connection_t *conn, xcb_screen_t *screen, xcb |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* In case the grab failed, we still need to free the reply */ |
|
|
|
|
|
free(kreply); |
|
|
|
|
|
|
|
|
/* Make this quite a bit slower */ |
|
|
/* Make this quite a bit slower */ |
|
|
usleep(50); |
|
|
usleep(50); |
|
|
|
|
|
|
|
|