Revert "xwm: fix memory leak"

This reverts commit 02abf1cd28.

The change doesn't make sense. It causes a use-after-free when trying
to read the pixel data of the icon. The docs clearly state to use
'xcb_ewmh_get_wm_icon_reply_wipe()' when using the function which
correctly frees the reply *after* processing the pixel data.
This commit is contained in:
Consolatis 2026-05-11 02:45:20 +02:00
parent 75932662ce
commit e4a1268b2a

View file

@ -1157,10 +1157,12 @@ bool wlr_xwayland_surface_fetch_icon(
return false;
}
bool ok = xcb_ewmh_get_wm_icon_from_reply(icon_reply, reply);
free(reply);
if (!xcb_ewmh_get_wm_icon_from_reply(icon_reply, reply)) {
free(reply);
return false;
}
return ok;
return true;
}
static xcb_get_property_cookie_t get_property(struct wlr_xwm *xwm,