xwm: fix memory leak

Signed-off-by: xurui <xurui@kylinos.cn>
This commit is contained in:
xurui 2026-04-29 11:20:11 +08:00
parent 8d0597e3db
commit 02abf1cd28

View file

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