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 <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Scott Moreau 2018-03-19 18:06:03 -06:00 committed by Pekka Paalanen
parent dc4024627c
commit d2cb711d81
1 changed files with 2 additions and 0 deletions

View File

@ -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);