From c19fae0282f52581665c62c74ab808b80382f301 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 8 Dec 2016 10:32:09 -0500 Subject: 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 --- src/ostree/ot-builtin-pull.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/ostree/ot-builtin-pull.c') diff --git a/src/ostree/ot-builtin-pull.c b/src/ostree/ot-builtin-pull.c index 8fa51002..f370ca01 100644 --- a/src/ostree/ot-builtin-pull.c +++ b/src/ostree/ot-builtin-pull.c @@ -109,7 +109,7 @@ dry_run_console_progress_changed (OstreeAsyncProgress *progress, gboolean ostree_builtin_pull (int argc, char **argv, GCancellable *cancellable, GError **error) { - GOptionContext *context; + g_autoptr(GOptionContext) context = NULL; glnx_unref_object OstreeRepo *repo = NULL; gboolean ret = FALSE; g_autofree char *remote = NULL; @@ -308,7 +308,5 @@ ostree_builtin_pull (int argc, char **argv, GCancellable *cancellable, GError ** out: if (signal_handler_id > 0) g_signal_handler_disconnect (repo, signal_handler_id); - if (context) - g_option_context_free (context); return ret; } -- cgit v1.2.1