libs/gst/controller/gstcontroller.c: Free allocated GstTimedValues when freeing list nodes.

Original commit message from CVS:
* libs/gst/controller/gstcontroller.c: (gst_controller_unset),
(gst_controller_unset_all):
Free allocated GstTimedValues when freeing list nodes.
Should fix leaks 'make check-valgrind' complains about.
* win32/common/libgstcontroller.def:
Add gst_controller_unset_all.
This commit is contained in:
Tim-Philipp Müller 2006-04-12 10:28:53 +00:00
parent e64da14164
commit 72845a47e6
3 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,13 @@
2006-04-12 Tim-Philipp Müller <tim at centricular dot net>
* libs/gst/controller/gstcontroller.c: (gst_controller_unset),
(gst_controller_unset_all):
Free allocated GstTimedValues when freeing list nodes.
Should fix leaks 'make check-valgrind' complains about.
* win32/common/libgstcontroller.def:
Add gst_controller_unset_all.
2006-04-11 Stefan Kost <ensonic@users.sf.net>
* docs/libs/gstreamer-libs-sections.txt:

View file

@ -792,6 +792,7 @@ gst_controller_unset (GstController * self, gchar * property_name,
/* check if a timed_value for the timestamp exists */
if ((node = g_list_find_custom (prop->values, &timestamp,
gst_timed_value_find))) {
g_free (node->data); /* free GstTimedValue */
prop->values = g_list_delete_link (prop->values, node);
res = TRUE;
}
@ -823,6 +824,8 @@ gst_controller_unset_all (GstController * self, gchar * property_name)
g_mutex_lock (self->lock);
if ((prop = gst_controller_find_controlled_property (self, property_name))) {
/* free GstTimedValue structures */
g_list_foreach (prop->values, (GFunc) g_free, NULL);
g_list_free (prop->values);
prop->values = NULL;
res = TRUE;

View file

@ -16,10 +16,11 @@ EXPORTS
gst_controller_set_interpolation_mode
gst_controller_sync_values
gst_controller_unset
gst_controller_unset_all
gst_object_control_properties
gst_object_get_controller
gst_object_get_value_array
gst_object_get_value_arrays
gst_object_set_controller
gst_object_sync_values
gst_object_uncontrol_properties
gst_object_uncontrol_properties