Fix use after free in wayland.c

This commit is contained in:
Anskrevy 2024-02-16 21:06:20 -08:00 committed by Jari Vetoniemi
parent 34259c5da7
commit 52b23d8fb5

View File

@ -547,8 +547,10 @@ recreate_windows(const struct bm_menu *menu, struct wayland *wayland)
wl_output = output->output;
if (!bm_wl_window_create(window, wayland->display, wayland->shm,
wl_output, wayland->layer_shell, surface))
wl_output, wayland->layer_shell, surface)) {
free(window);
goto fail;
}
window->notify.render = bm_cairo_paint;
window->render_pending = true;