[ostree/wip/packfile-rebase2] core: A few memory leak fixes
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree/wip/packfile-rebase2] core: A few memory leak fixes
- Date: Sat, 31 Mar 2012 14:19:08 +0000 (UTC)
commit 4e42639708b466cee059d8f78632ba07900a7337
Author: Colin Walters <walters verbum org>
Date: Tue Mar 27 22:37:03 2012 -0400
core: A few memory leak fixes
src/libostree/ostree-core.c | 1 +
src/libostree/ostree-repo.c | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index 24d1906..bdf4340 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -1340,6 +1340,7 @@ ostree_read_pack_entry_variant (GVariant *pack_entry,
g_memory_output_stream_get_data (data_stream),
g_memory_output_stream_get_data_size (data_stream),
trusted, (GDestroyNotify) g_object_unref, data_stream);
+ g_variant_ref_sink (container_variant);
data_stream = NULL; /* Transfer ownership */
g_variant_get (container_variant, "(uv)",
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index 277423f..dc55da6 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -2784,6 +2784,8 @@ ostree_repo_load_file (OstreeRepo *self,
g_clear_object (&content_loose_info);
g_clear_object (&ret_file_info);
ot_clear_gvariant (&ret_xattrs);
+ ot_clear_gvariant (&archive_meta);
+ ot_clear_gvariant (&packed_object);
return ret;
}
@@ -2923,6 +2925,8 @@ ostree_repo_list_pack_indexes (OstreeRepo *self,
ret = TRUE;
ot_transfer_out_value (out_indexes, &ret_indexes);
out:
+ if (index_files)
+ g_ptr_array_unref (index_files);
if (ret_indexes)
g_ptr_array_unref (ret_indexes);
return ret;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]