mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-03 13:16:04 +00:00
glviewconvert: fix a use-after-free with allocation params
_free(params) followed by a params->align is a bad idea :)
This commit is contained in:
parent
cbffe13d60
commit
af1986352b
|
@ -1982,7 +1982,6 @@ _gen_buffer (GstGLViewConvert * viewconvert, GstBuffer ** target)
|
|||
gst_object_unref (allocator);
|
||||
return FALSE;
|
||||
}
|
||||
gst_gl_allocation_params_free ((GstGLAllocationParams *) params);
|
||||
gst_object_unref (allocator);
|
||||
|
||||
meta = gst_buffer_add_video_meta_full (*target, 0,
|
||||
|
@ -1995,6 +1994,8 @@ _gen_buffer (GstGLViewConvert * viewconvert, GstBuffer ** target)
|
|||
if (params->valign)
|
||||
gst_video_meta_set_alignment (meta, *params->valign);
|
||||
|
||||
gst_gl_allocation_params_free ((GstGLAllocationParams *) params);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue