From 2e921d90962e5f6c8a60c9453026aeab62784ea3 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 31 Mar 2013 18:15:25 +0200 Subject: [PATCH] Fix minor memory leak in mouse_query_pointer() Signed-off-by: Uli Schlachter --- mouse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mouse.c b/mouse.c index 8d378534..f12e3bfc 100644 --- a/mouse.c +++ b/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); 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;