summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-store.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-09-28 17:18:11 +0100
committerRichard Hughes <richard@hughsie.com>2016-09-28 17:18:49 +0100
commit57f6d00ff98cdc5e70913701b8a70d47b3e5649b (patch)
tree0fa0d5988c9226d8c7ecc02d0759a46a45ca4051 /libappstream-glib/as-store.c
parentf0990480624f7f76f6d82a4d1d7356464e340880 (diff)
downloadappstream-glib-57f6d00ff98cdc5e70913701b8a70d47b3e5649b.tar.gz
Fix a small memory leak when parsing yaml files
Diffstat (limited to 'libappstream-glib/as-store.c')
-rw-r--r--libappstream-glib/as-store.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c
index de5aba1..44f15ed 100644
--- a/libappstream-glib/as-store.c
+++ b/libappstream-glib/as-store.c
@@ -1239,7 +1239,7 @@ as_store_from_root (AsStore *store,
const gchar *tmp;
const gchar *origin_delim = ":";
gchar *str;
- g_autofree AsNodeContext *ctx = NULL;
+ g_autoptr(AsNodeContext) ctx = NULL;
g_autofree gchar *icon_path = NULL;
g_autofree gchar *id_prefix_app = NULL;
g_autofree gchar *origin_app = NULL;
@@ -1428,7 +1428,7 @@ as_store_load_yaml_file (AsStore *store,
AsNode *app_n;
AsNode *n;
const gchar *tmp;
- g_autofree AsNodeContext *ctx = NULL;
+ g_autoptr(AsNodeContext) ctx = NULL;
g_autofree gchar *icon_path = NULL;
g_autoptr(AsYaml) root = NULL;
_cleanup_uninhibit_ guint32 *tok = NULL;
@@ -1980,7 +1980,7 @@ as_store_to_xml (AsStore *store, AsNodeToXmlFlags flags)
gboolean output_trusted = FALSE;
guint i;
gchar version[6];
- g_autofree AsNodeContext *ctx = NULL;
+ g_autoptr(AsNodeContext) ctx = NULL;
/* check categories of apps about to be written */
as_store_check_apps_for_veto (store);