mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
ges: Fix more ges_timeline_get_layers() usage memory leaks
This commit is contained in:
parent
8dff71aa08
commit
753c16055e
2 changed files with 8 additions and 4 deletions
|
@ -309,9 +309,14 @@ gboolean
|
|||
ges_formatter_save (GESFormatter * formatter, GESTimeline * timeline)
|
||||
{
|
||||
GESFormatterClass *klass;
|
||||
GList *layers;
|
||||
|
||||
/* Saving an empty timeline is not allowed */
|
||||
g_return_val_if_fail (ges_timeline_get_layers (timeline) != NULL, FALSE);
|
||||
layers = ges_timeline_get_layers (timeline);
|
||||
|
||||
g_return_val_if_fail (layers != NULL, FALSE);
|
||||
g_list_foreach (layers, (GFunc) g_object_unref, NULL);
|
||||
g_list_free (layers);
|
||||
|
||||
klass = GES_FORMATTER_GET_CLASS (formatter);
|
||||
|
||||
|
|
|
@ -177,9 +177,8 @@ save_keyfile (GESFormatter * keyfile_formatter, GESTimeline * timeline)
|
|||
g_list_free (objs);
|
||||
}
|
||||
|
||||
for (tmp = layers; tmp; tmp = g_list_next (tmp)) {
|
||||
g_object_unref (tmp->data);
|
||||
}
|
||||
g_list_foreach (layers, (GFunc) g_object_unref, NULL);
|
||||
g_list_free (layers);
|
||||
|
||||
data = g_key_file_to_data (kf, &length, NULL);
|
||||
ges_formatter_set_data (keyfile_formatter, data, length);
|
||||
|
|
Loading…
Reference in a new issue