diff options
author | Richard Hughes <richard@hughsie.com> | 2016-09-28 17:18:11 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-09-28 17:18:49 +0100 |
commit | 57f6d00ff98cdc5e70913701b8a70d47b3e5649b (patch) | |
tree | 0fa0d5988c9226d8c7ecc02d0759a46a45ca4051 /libappstream-glib/as-node.c | |
parent | f0990480624f7f76f6d82a4d1d7356464e340880 (diff) | |
download | appstream-glib-57f6d00ff98cdc5e70913701b8a70d47b3e5649b.tar.gz |
Fix a small memory leak when parsing yaml files
Diffstat (limited to 'libappstream-glib/as-node.c')
-rw-r--r-- | libappstream-glib/as-node.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libappstream-glib/as-node.c b/libappstream-glib/as-node.c index bceb7b2..9579bea 100644 --- a/libappstream-glib/as-node.c +++ b/libappstream-glib/as-node.c @@ -1949,6 +1949,23 @@ as_node_context_new (void) } /** + * as_node_context_free: (skip) + * @ctx: a #AsNodeContext. + * + * Frees the node context. + * + * Since: 0.6.4 + **/ +void +as_node_context_free (AsNodeContext *ctx) +{ + if (ctx == NULL) + return; + g_free (ctx->media_base_url); + g_free (ctx); +} + +/** * as_node_context_get_version: (skip) * @ctx: a #AsNodeContext. * |