mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 23:58:17 +00:00
ges: fix various leaks with usage of ges_timeline_element_lookup_child
Some callers forgot to unref out child, pspec or both leading to leaks. https://bugzilla.gnome.org/show_bug.cgi?id=766449
This commit is contained in:
parent
7529e25b49
commit
96a8c6db0c
2 changed files with 9 additions and 0 deletions
|
@ -220,6 +220,8 @@ _ges_container_add_child_properties (GESContainer * container,
|
|||
if (ges_timeline_element_lookup_child (child, prop_name, &prop_child, NULL)) {
|
||||
ges_timeline_element_add_child_property (GES_TIMELINE_ELEMENT (container),
|
||||
child_props[i], prop_child);
|
||||
gst_object_unref (prop_child);
|
||||
|
||||
}
|
||||
g_free (prop_name);
|
||||
g_param_spec_unref (child_props[i]);
|
||||
|
@ -247,6 +249,7 @@ _ges_container_remove_child_properties (GESContainer * container,
|
|||
if (ges_timeline_element_lookup_child (child, prop_name, &prop_child, NULL)) {
|
||||
ges_timeline_element_remove_child_property (GES_TIMELINE_ELEMENT
|
||||
(container), child_props[i]);
|
||||
gst_object_unref (prop_child);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1315,6 +1315,8 @@ ges_timeline_element_set_child_property_by_pspec (GESTimelineElement * self,
|
|||
goto not_found;
|
||||
|
||||
g_object_set_property (child, pspec->name, value);
|
||||
gst_object_unref (child);
|
||||
g_param_spec_unref (pspec);
|
||||
|
||||
return;
|
||||
|
||||
|
@ -1493,6 +1495,7 @@ ges_timeline_element_set_child_property_valist (GESTimelineElement * self,
|
|||
g_object_set_property (child, pspec->name, &value);
|
||||
|
||||
gst_object_unref (child);
|
||||
g_param_spec_unref (pspec);
|
||||
g_value_unset (&value);
|
||||
|
||||
name = va_arg (var_args, gchar *);
|
||||
|
@ -1509,6 +1512,8 @@ cant_copy:
|
|||
GST_WARNING_OBJECT (self, "error copying value %s in %p: %s", pspec->name,
|
||||
self, error);
|
||||
|
||||
gst_object_unref (child);
|
||||
g_param_spec_unref (pspec);
|
||||
g_value_unset (&value);
|
||||
return;
|
||||
}
|
||||
|
@ -1574,6 +1579,7 @@ ges_timeline_element_get_child_property_valist (GESTimelineElement * self,
|
|||
g_value_init (&value, pspec->value_type);
|
||||
g_object_get_property (child, pspec->name, &value);
|
||||
gst_object_unref (child);
|
||||
g_param_spec_unref (pspec);
|
||||
|
||||
G_VALUE_LCOPY (&value, var_args, 0, &error);
|
||||
if (error)
|
||||
|
|
Loading…
Reference in a new issue