[ostree] core: Squash a memory leak while reading gvariants
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] core: Squash a memory leak while reading gvariants
- Date: Wed, 9 Nov 2011 11:33:00 +0000 (UTC)
commit 3cd55cb9ab4e69eaec83f9b7a5a959fe7b8ceae8
Author: Colin Walters <walters verbum org>
Date: Wed Nov 9 06:06:33 2011 -0500
core: Squash a memory leak while reading gvariants
libostree/ostree-core.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/libostree/ostree-core.c b/libostree/ostree-core.c
index 904ce05..a3fc34c 100644
--- a/libostree/ostree-core.c
+++ b/libostree/ostree-core.c
@@ -346,7 +346,6 @@ ostree_parse_metadata_file (const char *path,
&container, error))
goto out;
- g_variant_ref_sink (container);
g_variant_get (container, "(uv)",
&ret_type, &ret_variant);
ret_type = GUINT32_FROM_BE (ret_type);
@@ -359,7 +358,7 @@ ostree_parse_metadata_file (const char *path,
ret = TRUE;
*out_type = ret_type;
- *out_variant = g_variant_ref_sink (ret_variant);
+ *out_variant = g_variant_take_ref (ret_variant);
ret_variant = NULL;
out:
if (ret_variant)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]