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>
This commit is contained in:
Pekka Paalanen
2022-05-31 13:08:01 +03:00
parent 7412a01437
commit e67a0cb57c
+1 -1
View File
@@ -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;