xwm: fix memory leak

Signed-off-by: xurui <xurui@kylinos.cn>
(cherry picked from commit 02abf1cd28)
This commit is contained in:
xurui 2026-04-29 11:20:11 +08:00 committed by Simon Zeni
parent 1688cfb814
commit e7b3e5a973

View file

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