gl-renderer: Don't check zalloc return in gl_render_attach_shm

We don't always check allocation failures, so why bother here?

Removing this allows simplifying some code in a further patch.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2024-06-05 13:28:32 -05:00 committed by Marius Vlad
parent 41ff97a0d9
commit 4be5e79f8d
1 changed files with 1 additions and 3 deletions

View File

@ -2693,9 +2693,7 @@ gl_renderer_attach_shm(struct weston_surface *es, struct weston_buffer *buffer)
destroy_buffer_state(gs->buffer);
gs->buffer = NULL;
gb = zalloc(sizeof(*gb));
if (!gb)
return false;
gb = xzalloc(sizeof(*gb));
gb->gr = gr;
wl_list_init(&gb->destroy_listener.link);