diff options
author | Colin Walters <walters@verbum.org> | 2016-12-08 10:32:09 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2016-12-08 16:48:20 +0000 |
commit | c19fae0282f52581665c62c74ab808b80382f301 (patch) | |
tree | b19a35333e8d16db0a26ff46d55182b3fe52c556 /src/ostree/ot-remote-builtin-refs.c | |
parent | 5155662b57fe5943bba014c3035d87229f55ce54 (diff) | |
download | ostree-c19fae0282f52581665c62c74ab808b80382f301.tar.gz |
tree-wide: Switch to autoptr for GOptionContext
We were leaking in a few places that I noticed in an ASAN run. Also,
this was one of the last non-autoptr cleanup sections we have in
`out:` cleanup sections, making us a lot closer to a potential
full-tree rewrite to `return FALSE`.
Closes: #624
Approved by: jlebon
Diffstat (limited to 'src/ostree/ot-remote-builtin-refs.c')
-rw-r--r-- | src/ostree/ot-remote-builtin-refs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ostree/ot-remote-builtin-refs.c b/src/ostree/ot-remote-builtin-refs.c index 4317c45f..9e742912 100644 --- a/src/ostree/ot-remote-builtin-refs.c +++ b/src/ostree/ot-remote-builtin-refs.c @@ -35,7 +35,7 @@ static GOptionEntry option_entries[] = { gboolean ot_remote_builtin_refs (int argc, char **argv, GCancellable *cancellable, GError **error) { - GOptionContext *context; + g_autoptr(GOptionContext) context = NULL; glnx_unref_object OstreeRepo *repo = NULL; const char *remote_name; gboolean ret = FALSE; @@ -78,9 +78,6 @@ ot_remote_builtin_refs (int argc, char **argv, GCancellable *cancellable, GError } ret = TRUE; - out: - g_option_context_free (context); - return ret; } |