mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
v4l2: avoid leaking GValues
unset the GValue if we don't use it any more to avoid leaks.
This commit is contained in:
parent
4a0de53cc1
commit
c9c051d53d
1 changed files with 12 additions and 8 deletions
|
@ -2163,6 +2163,8 @@ gst_v4l2_object_fill_colorimetry_list (GValue * list,
|
|||
|
||||
if (!found)
|
||||
gst_value_list_append_and_take_value (list, &colorimetry);
|
||||
else
|
||||
g_value_unset (&colorimetry);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2265,6 +2267,8 @@ gst_v4l2_object_add_colorspace (GstV4l2Object * v4l2object, GstStructure * s,
|
|||
|
||||
if (gst_value_list_get_size (&list) > 0)
|
||||
gst_structure_take_value (s, "colorimetry", &list);
|
||||
else
|
||||
g_value_unset (&list);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue