From d2cb711d813e750b1e303e6200c027fd27a21f8e Mon Sep 17 00:00:00 2001 From: Scott Moreau Date: Mon, 19 Mar 2018 18:06:03 -0600 Subject: [PATCH] xwm: Fix memory leak Fix memory leak introduced by 6b58ea8c. weston_wm_handle_icon() was calling xcb_get_property_reply() without freeing the reply. Reviewed-by: Pekka Paalanen --- xwayland/window-manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index c307e1992..24e721326 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -1387,6 +1387,8 @@ weston_wm_handle_icon(struct weston_wm *wm, struct weston_wm_window *window) CAIRO_FORMAT_ARGB32, width, height, width * 4); + free(reply); + /* Bail out in case anything wrong happened during surface creation. */ if (cairo_surface_status(new_surface) != CAIRO_STATUS_SUCCESS) { cairo_surface_destroy(new_surface);