v4l2: avoid leaking GValues

unset the GValue if we don't use it any more to avoid leaks.
This commit is contained in:
Wim Taymans 2016-04-12 11:56:08 +02:00
parent 4a0de53cc1
commit c9c051d53d

View file

@ -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;
}