47 lines
2.6 KiB
Diff
47 lines
2.6 KiB
Diff
From: Alexander Larsson <alexl@redhat.com>
|
|
Date: Mon, 28 Nov 2016 17:21:59 +0100
|
|
Subject: delta compilation: Fix leak
|
|
|
|
We need to ref-sik the new varian for g_autoptr to work
|
|
|
|
Closes: #597
|
|
Approved by: cgwalters
|
|
Origin: upstream, 2016.15, commit:d57036f
|
|
---
|
|
.../ostree-repo-static-delta-compilation.c | 22 +++++++++++-----------
|
|
1 file changed, 11 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/src/libostree/ostree-repo-static-delta-compilation.c b/src/libostree/ostree-repo-static-delta-compilation.c
|
|
index 4b0bc50..22c45e6 100644
|
|
--- a/src/libostree/ostree-repo-static-delta-compilation.c
|
|
+++ b/src/libostree/ostree-repo-static-delta-compilation.c
|
|
@@ -1532,17 +1532,17 @@ ostree_repo_static_delta_generate (OstreeRepo *self,
|
|
/* floating */ GVariant *to_csum_v =
|
|
ostree_checksum_to_bytes_v (to);
|
|
|
|
- delta_descriptor = g_variant_new ("(@a{sv}t@ay@ay@" OSTREE_COMMIT_GVARIANT_STRING "ay"
|
|
- "a" OSTREE_STATIC_DELTA_META_ENTRY_FORMAT
|
|
- "@a" OSTREE_STATIC_DELTA_FALLBACK_FORMAT ")",
|
|
- g_variant_builder_end (&metadata_builder),
|
|
- GUINT64_TO_BE (g_date_time_to_unix (now)),
|
|
- from_csum_v,
|
|
- to_csum_v,
|
|
- to_commit,
|
|
- g_variant_builder_new (G_VARIANT_TYPE ("ay")),
|
|
- part_headers,
|
|
- fallback_headers);
|
|
+ delta_descriptor = g_variant_ref_sink (g_variant_new ("(@a{sv}t@ay@ay@" OSTREE_COMMIT_GVARIANT_STRING "ay"
|
|
+ "a" OSTREE_STATIC_DELTA_META_ENTRY_FORMAT
|
|
+ "@a" OSTREE_STATIC_DELTA_FALLBACK_FORMAT ")",
|
|
+ g_variant_builder_end (&metadata_builder),
|
|
+ GUINT64_TO_BE (g_date_time_to_unix (now)),
|
|
+ from_csum_v,
|
|
+ to_csum_v,
|
|
+ to_commit,
|
|
+ g_variant_builder_new (G_VARIANT_TYPE ("ay")),
|
|
+ part_headers,
|
|
+ fallback_headers));
|
|
g_date_time_unref (now);
|
|
}
|
|
|