mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 09:41:07 +00:00
v4l2object: Fix a gvalue leak on error
In case we failed enumerating the supported interlacing mode, we leaked the gvalue. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
This commit is contained in:
parent
a6959f3738
commit
09e23e325c
1 changed files with 3 additions and 1 deletions
|
@ -2378,9 +2378,11 @@ gst_v4l2_object_add_interlace_mode (GstV4l2Object * v4l2object,
|
|||
if (gst_v4l2src_value_simplify (&interlace_formats)
|
||||
|| gst_value_list_get_size (&interlace_formats) > 0)
|
||||
gst_structure_take_value (s, "interlace-mode", &interlace_formats);
|
||||
else
|
||||
else {
|
||||
GST_WARNING_OBJECT (v4l2object->dbg_obj,
|
||||
"Failed to determine interlace mode");
|
||||
g_value_unset (&interlace_formats);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue