36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
From: Colin Walters <walters@verbum.org>
|
|
Date: Mon, 28 Nov 2016 21:12:53 -0500
|
|
Subject: [ASAN] cmdline: Fix minor leak in delta cmdline entrypoint
|
|
|
|
Small, but it's important to stay clean.
|
|
|
|
Closes: #598
|
|
Approved by: jlebon
|
|
---
|
|
src/ostree/ot-builtin-static-delta.c | 12 +++++++-----
|
|
1 file changed, 7 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/src/ostree/ot-builtin-static-delta.c b/src/ostree/ot-builtin-static-delta.c
|
|
index ca29911..e1c3bb4 100644
|
|
--- a/src/ostree/ot-builtin-static-delta.c
|
|
+++ b/src/ostree/ot-builtin-static-delta.c
|
|
@@ -336,11 +336,13 @@ ot_static_delta_builtin_generate (int argc, char **argv, GCancellable *cancellab
|
|
g_print ("Generating static delta:\n");
|
|
g_print (" From: %s\n", from_resolved ? from_resolved : "empty");
|
|
g_print (" To: %s\n", to_resolved);
|
|
- if (!ostree_repo_static_delta_generate (repo, OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR,
|
|
- from_resolved, to_resolved, NULL,
|
|
- g_variant_builder_end (parambuilder),
|
|
- cancellable, error))
|
|
- goto out;
|
|
+ { g_autoptr(GVariant) params = g_variant_ref_sink (g_variant_builder_end (parambuilder));
|
|
+ if (!ostree_repo_static_delta_generate (repo, OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR,
|
|
+ from_resolved, to_resolved, NULL,
|
|
+ params,
|
|
+ cancellable, error))
|
|
+ goto out;
|
|
+ }
|
|
|
|
}
|
|
|