Revert "xwm: Fix memory leak"

This reverts commit d2cb711d81.

I missed the call to cairo_image_surface_create_for_data() which assumes
the data will remain present until the cairo surface is destroyed. It
seems the existence of data depends on the reply not being freed.

This will need a more involved fix.

Sorry, I noticed this just seconds after I pushed the patch.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Pekka Paalanen 2018-03-20 10:12:37 +02:00
parent d2cb711d81
commit 9fe5d5fae9

View File

@ -1387,8 +1387,6 @@ 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);