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:
parent
41ff97a0d9
commit
4be5e79f8d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue