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:
@@ -2548,7 +2548,7 @@ import_dmabuf(struct gl_renderer *gr,
|
|||||||
struct linux_dmabuf_buffer *dmabuf)
|
struct linux_dmabuf_buffer *dmabuf)
|
||||||
{
|
{
|
||||||
EGLImageKHR egl_image;
|
EGLImageKHR egl_image;
|
||||||
struct gl_buffer_state *gb = zalloc(sizeof(*gb));
|
struct gl_buffer_state *gb;
|
||||||
|
|
||||||
if (!pixel_format_get_info(dmabuf->attributes.format))
|
if (!pixel_format_get_info(dmabuf->attributes.format))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user