gl-renderer: fix double-alloc of gl_buffer_state

Obviously the first allocation is always leaked, there is a second
zalloc() right below. Fix the leak.

Found by code inspection.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 2 years ago
parent 7412a01437
commit e67a0cb57c
  1. 2
      libweston/renderer-gl/gl-renderer.c

@ -2548,7 +2548,7 @@ import_dmabuf(struct gl_renderer *gr,
struct linux_dmabuf_buffer *dmabuf)
{
EGLImageKHR egl_image;
struct gl_buffer_state *gb = zalloc(sizeof(*gb));
struct gl_buffer_state *gb;
if (!pixel_format_get_info(dmabuf->attributes.format))
return NULL;

Loading…
Cancel
Save