diff options
author | Kenny Levinsen <kl@kl.wtf> | 2024-02-22 17:41:39 +0100 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2024-02-22 17:46:05 +0100 |
commit | 484a87ce616e28791e9f7ae285d79e1ec4871892 (patch) | |
tree | 71457b90dd41912ceba44fa5b197a94cb148cd16 /xwayland | |
parent | 837060f894a4aba7d069b35f4600003fb0d10036 (diff) |
xwayland/xwm: Allocate to the right variable
837060f894a4 made a change to only allocate the xcb_window_t array if it
was not going to be zero-sized. It accidentally shadowed the variable so
the output of the allocation would never be used.
Regressed-by: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4563
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/xwm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 8cc64a12..75666810 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -292,7 +292,7 @@ static void xwm_set_net_client_list(struct wlr_xwm *xwm) { xcb_window_t *windows = NULL; if (mapped_surfaces > 0) { - xcb_window_t *windows = malloc(sizeof(*windows) * mapped_surfaces); + windows = malloc(sizeof(*windows) * mapped_surfaces); if (!windows) { return; } |