summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2017-11-27 11:49:04 +0100
committerEdward Hervey <bilboed@bilboed.com>2017-11-27 11:49:43 +0100
commit9a45d0ef857d1751dc9cd6282ab7762ad7c8f8f5 (patch)
treee565fd678d21ad9a41c9effebd4f145fcd8dfd0f
parentbaa83510fc134f95e16c5985d651a345587b7c91 (diff)
ges: Fix a bunch of leaks
There are definitely more left, but don't have time for more debugging
-rw-r--r--ges/ges-asset.c2
-rw-r--r--ges/ges-base-xml-formatter.c1
-rw-r--r--ges/ges-effect-asset.c1
-rw-r--r--ges/ges-effect.c2
-rw-r--r--ges/ges-timeline-element.c4
-rw-r--r--ges/ges-uri-asset.c10
-rw-r--r--ges/ges-xml-formatter.c2
7 files changed, 18 insertions, 4 deletions
diff --git a/ges/ges-asset.c b/ges/ges-asset.c
index 6ff643cec6..77a45cfc43 100644
--- a/ges/ges-asset.c
+++ b/ges/ges-asset.c
@@ -983,6 +983,8 @@ ges_asset_request (GType extractable_type, const gchar * id, GError ** error)
_unsure_material_for_wrong_id (id, extractable_type, lerr);
real_id = g_strdup (id);
}
+ if (lerr)
+ g_error_free (lerr);
asset = ges_asset_cache_lookup (extractable_type, real_id);
if (asset) {
diff --git a/ges/ges-base-xml-formatter.c b/ges/ges-base-xml-formatter.c
index ede45c8d9b..908267eb17 100644
--- a/ges/ges-base-xml-formatter.c
+++ b/ges/ges-base-xml-formatter.c
@@ -486,6 +486,7 @@ _loading_done (GESFormatter * self)
for (tmp = assets; tmp; tmp = tmp->next) {
ges_asset_set_proxy (NULL, tmp->data);
}
+ g_list_free (assets);
g_hash_table_foreach (priv->layers, (GHFunc) _set_auto_transition, NULL);
ges_project_set_loaded (self->project, self);
diff --git a/ges/ges-effect-asset.c b/ges/ges-effect-asset.c
index 6ebd1ef2a0..8189c530f6 100644
--- a/ges/ges-effect-asset.c
+++ b/ges/ges-effect-asset.c
@@ -50,6 +50,7 @@ _fill_track_type (GESAsset * asset)
if (bin_desc) {
ges_track_element_asset_set_track_type (GES_TRACK_ELEMENT_ASSET (asset),
ttype);
+ g_free (bin_desc);
} else {
GST_WARNING_OBJECT (asset, "No track type set, you should"
" specify one in [audio, video] as first component" " in the asset id");
diff --git a/ges/ges-effect.c b/ges/ges-effect.c
index 66c347f37b..c1ce16605d 100644
--- a/ges/ges-effect.c
+++ b/ges/ges-effect.c
@@ -71,6 +71,8 @@ extractable_check_id (GType type, const gchar * id, GError ** error)
else
g_assert_not_reached ();
+ g_free (bin_desc);
+
return real_id;
}
diff --git a/ges/ges-timeline-element.c b/ges/ges-timeline-element.c
index caf7424467..da6de4f60d 100644
--- a/ges/ges-timeline-element.c
+++ b/ges/ges-timeline-element.c
@@ -1316,18 +1316,18 @@ gboolean
ges_timeline_element_add_child_property (GESTimelineElement * self,
GParamSpec * pspec, GObject * child)
{
- gchar *signame = g_strconcat ("notify::", pspec->name, NULL);
+ gchar *signame;
ChildPropHandler *handler;
if (g_hash_table_contains (self->priv->children_props, pspec)) {
GST_INFO_OBJECT (self, "Child property already exists: %s", pspec->name);
-
return FALSE;
}
GST_DEBUG_OBJECT (self, "Adding child property: %" GST_PTR_FORMAT "::%s",
child, pspec->name);
+ signame = g_strconcat ("notify::", pspec->name, NULL);
handler = (ChildPropHandler *) g_slice_new0 (ChildPropHandler);
handler->child = gst_object_ref (child);
handler->handler_id =
diff --git a/ges/ges-uri-asset.c b/ges/ges-uri-asset.c
index 7a27a03a03..33898781f6 100644
--- a/ges/ges-uri-asset.c
+++ b/ges/ges-uri-asset.c
@@ -369,12 +369,14 @@ static void
_set_meta_file_size (const gchar * uri, GESUriClipAsset * asset)
{
GError *error = NULL;
- GFileInfo *file_info;
+ GFileInfo *file_info = NULL;
guint64 file_size;
+ GFile *gfile = NULL;
GESMetaContainer *container = GES_META_CONTAINER (asset);
- file_info = g_file_query_info (g_file_new_for_uri (uri), "standard::size",
+ gfile = g_file_new_for_uri (uri);
+ file_info = g_file_query_info (gfile, "standard::size",
G_FILE_QUERY_INFO_NONE, NULL, &error);
if (!error) {
file_size = g_file_info_get_attribute_uint64 (file_info, "standard::size");
@@ -383,6 +385,10 @@ _set_meta_file_size (const gchar * uri, GESUriClipAsset * asset)
} else {
g_error_free (error);
}
+ if (gfile)
+ g_object_unref (gfile);
+ if (file_info)
+ g_object_unref (file_info);
}
static void
diff --git a/ges/ges-xml-formatter.c b/ges/ges-xml-formatter.c
index bf2f9c7816..ea54b722ef 100644
--- a/ges/ges-xml-formatter.c
+++ b/ges/ges-xml-formatter.c
@@ -1256,6 +1256,7 @@ _save_layers (GESXmlFormatter * self, GString * str, GESTimeline * timeline)
priv->nbelements++;
}
+ g_list_free_full (clips, (GDestroyNotify) gst_object_unref);
g_string_append (str, " </layer>\n");
}
}
@@ -1318,6 +1319,7 @@ _save_groups (GESXmlFormatter * self, GString * str, GESTimeline * timeline)
for (tmp = ges_timeline_get_groups (timeline); tmp; tmp = tmp->next) {
_save_group (self, str, &seen_groups, tmp->data);
}
+ g_list_free (seen_groups);
g_string_append (str, " </groups>\n");
}