mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
asset: Fix some leaks
This commit is contained in:
parent
96d3afce6e
commit
38bc983502
1 changed files with 9 additions and 2 deletions
|
@ -346,6 +346,9 @@ ges_asset_finalize (GObject * object)
|
||||||
if (priv->proxied_asset_id)
|
if (priv->proxied_asset_id)
|
||||||
g_free (priv->proxied_asset_id);
|
g_free (priv->proxied_asset_id);
|
||||||
|
|
||||||
|
if (priv->error)
|
||||||
|
g_error_free (priv->error);
|
||||||
|
|
||||||
G_OBJECT_CLASS (ges_asset_parent_class)->finalize (object);
|
G_OBJECT_CLASS (ges_asset_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -484,6 +487,8 @@ ges_asset_cache_set_loaded (GType extractable_type, const gchar * id,
|
||||||
GList *results = entry->results;
|
GList *results = entry->results;
|
||||||
|
|
||||||
asset->priv->state = ASSET_INITIALIZED_WITH_ERROR;
|
asset->priv->state = ASSET_INITIALIZED_WITH_ERROR;
|
||||||
|
if (asset->priv->error)
|
||||||
|
g_error_free (asset->priv->error);
|
||||||
asset->priv->error = g_error_copy (error);
|
asset->priv->error = g_error_copy (error);
|
||||||
entry->results = NULL;
|
entry->results = NULL;
|
||||||
UNLOCK_CACHE;
|
UNLOCK_CACHE;
|
||||||
|
@ -494,6 +499,7 @@ ges_asset_cache_set_loaded (GType extractable_type, const gchar * id,
|
||||||
g_simple_async_result_set_from_error (G_SIMPLE_ASYNC_RESULT (tmp->data),
|
g_simple_async_result_set_from_error (G_SIMPLE_ASYNC_RESULT (tmp->data),
|
||||||
error);
|
error);
|
||||||
g_simple_async_result_complete (G_SIMPLE_ASYNC_RESULT (tmp->data));
|
g_simple_async_result_complete (G_SIMPLE_ASYNC_RESULT (tmp->data));
|
||||||
|
gst_object_unref (tmp->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_list_free (results);
|
g_list_free (results);
|
||||||
|
@ -501,8 +507,9 @@ ges_asset_cache_set_loaded (GType extractable_type, const gchar * id,
|
||||||
} else {
|
} else {
|
||||||
asset->priv->state = ASSET_INITIALIZED;
|
asset->priv->state = ASSET_INITIALIZED;
|
||||||
|
|
||||||
g_list_free_full (entry->results,
|
g_list_foreach (entry->results,
|
||||||
(GDestroyNotify) g_simple_async_result_complete_in_idle);
|
(GFunc) g_simple_async_result_complete_in_idle, NULL);
|
||||||
|
g_list_free_full (entry->results, g_object_unref);
|
||||||
entry->results = NULL;
|
entry->results = NULL;
|
||||||
UNLOCK_CACHE;
|
UNLOCK_CACHE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue