Fix minor memory leak in mouse_query_pointer()

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2013-03-31 18:15:25 +02:00
parent a7c3f10ce5
commit 2e921d9096
1 changed files with 3 additions and 0 deletions

View File

@ -45,7 +45,10 @@ mouse_query_pointer(xcb_window_t window, int16_t *x, int16_t *y, xcb_window_t *c
query_ptr_r = xcb_query_pointer_reply(globalconf.connection, query_ptr_c, NULL);
if(!query_ptr_r || !query_ptr_r->same_screen)
{
p_delete(&query_ptr_r);
return false;
}
*x = query_ptr_r->win_x;
*y = query_ptr_r->win_y;