Fix minor memory leak in mouse_query_pointer()
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
a7c3f10ce5
commit
2e921d9096
3
mouse.c
3
mouse.c
|
@ -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);
|
query_ptr_r = xcb_query_pointer_reply(globalconf.connection, query_ptr_c, NULL);
|
||||||
|
|
||||||
if(!query_ptr_r || !query_ptr_r->same_screen)
|
if(!query_ptr_r || !query_ptr_r->same_screen)
|
||||||
|
{
|
||||||
|
p_delete(&query_ptr_r);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
*x = query_ptr_r->win_x;
|
*x = query_ptr_r->win_x;
|
||||||
*y = query_ptr_r->win_y;
|
*y = query_ptr_r->win_y;
|
||||||
|
|
Loading…
Reference in New Issue