summaryrefslogtreecommitdiff
path: root/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-12-08 10:32:09 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2016-12-08 16:48:20 +0000
commitc19fae0282f52581665c62c74ab808b80382f301 (patch)
treeb19a35333e8d16db0a26ff46d55182b3fe52c556 /src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
parent5155662b57fe5943bba014c3035d87229f55ce54 (diff)
downloadostree-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-admin-instutil-builtin-selinux-ensure-labeled.c')
-rw-r--r--src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c b/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
index 692a2623..424c7645 100644
--- a/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
+++ b/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
@@ -188,7 +188,7 @@ ot_admin_instutil_builtin_selinux_ensure_labeled (int argc, char **argv, GCancel
glnx_unref_object OstreeSePolicy *sepolicy = NULL;
g_autoptr(GPtrArray) deployments = NULL;
OstreeDeployment *first_deployment;
- GOptionContext *context = NULL;
+ g_autoptr(GOptionContext) context = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
g_autoptr(GFile) deployment_path = NULL;
@@ -241,7 +241,5 @@ ot_admin_instutil_builtin_selinux_ensure_labeled (int argc, char **argv, GCancel
ret = TRUE;
out:
- if (context)
- g_option_context_free (context);
return ret;
}