diff options
author | Colin Walters <walters@verbum.org> | 2016-11-28 21:12:53 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2016-11-30 18:51:26 +0000 |
commit | a1224e2de7eb75b4202494fca2b8a8623383fba0 (patch) | |
tree | 9e577839abf210388702eb0f3c8b96d21351b172 | |
parent | ab0400b722cb1c9df320bb5231903b1f9a40172b (diff) | |
download | ostree-a1224e2de7eb75b4202494fca2b8a8623383fba0.tar.gz |
[ASAN] cmdline: Fix minor leak in delta cmdline entrypoint
Small, but it's important to stay clean.
Closes: #598
Approved by: jlebon
-rw-r--r-- | src/ostree/ot-builtin-static-delta.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ostree/ot-builtin-static-delta.c b/src/ostree/ot-builtin-static-delta.c index ca29911a..e1c3bb48 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; + } } |