mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
xml-formatter: Plug leaks of pending groups
This commit is contained in:
parent
0dcf78f3ec
commit
adc4843f53
2 changed files with 18 additions and 0 deletions
|
@ -146,6 +146,16 @@ _free_layer_entry (LayerEntry * entry)
|
||||||
g_slice_free (LayerEntry, entry);
|
g_slice_free (LayerEntry, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_free_pending_group (PendingGroup * pgroup)
|
||||||
|
{
|
||||||
|
if (pgroup->group)
|
||||||
|
g_object_unref (pgroup->group);
|
||||||
|
g_list_free (pgroup->pending_children);
|
||||||
|
g_slice_free (PendingGroup, pgroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -368,6 +378,9 @@ _finalize (GObject * object)
|
||||||
if (priv->parsecontext != NULL)
|
if (priv->parsecontext != NULL)
|
||||||
g_markup_parse_context_free (priv->parsecontext);
|
g_markup_parse_context_free (priv->parsecontext);
|
||||||
|
|
||||||
|
g_list_free_full (priv->groups, (GDestroyNotify) _free_pending_group);
|
||||||
|
priv->groups = NULL;
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,7 +477,11 @@ _add_all_groups (GESFormatter * self)
|
||||||
GES_TIMELINE_ELEMENT_NAME (child));
|
GES_TIMELINE_ELEMENT_NAME (child));
|
||||||
ges_container_add (GES_CONTAINER (pgroup->group), child);
|
ges_container_add (GES_CONTAINER (pgroup->group), child);
|
||||||
}
|
}
|
||||||
|
pgroup->group = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_list_free_full (priv->groups, (GDestroyNotify) _free_pending_group);
|
||||||
|
priv->groups = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -674,6 +674,7 @@ GST_START_TEST (test_group_serialization)
|
||||||
|
|
||||||
|
|
||||||
g_free (tmpuri);
|
g_free (tmpuri);
|
||||||
|
gst_object_unref (timeline);
|
||||||
|
|
||||||
ges_deinit ();
|
ges_deinit ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue