mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-05-13 23:51:49 -04:00
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:
parent
75932662ce
commit
e4a1268b2a
1 changed files with 5 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue