From 74db30872bcb2f89fdb879f6a757b1c629e97f47 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 2 Nov 2018 15:12:21 -0400 Subject: [PATCH] compose: Check for error when opening policy Closes: #1658 Approved by: cgwalters --- src/app/rpmostree-compose-builtin-tree.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/rpmostree-compose-builtin-tree.c b/src/app/rpmostree-compose-builtin-tree.c index fb7db09b..b51d9fce 100644 --- a/src/app/rpmostree-compose-builtin-tree.c +++ b/src/app/rpmostree-compose-builtin-tree.c @@ -350,6 +350,9 @@ install_packages (RpmOstreeTreeComposeContext *self, * be important for the ostree-rojig work. */ g_autoptr(OstreeSePolicy) sepolicy = ostree_sepolicy_new_at (rootfs_dfd, cancellable, error); + if (sepolicy == NULL) + return FALSE; + rpmostree_context_set_sepolicy (self->corectx, sepolicy); if (!rpmostree_context_force_relabel (self->corectx, cancellable, error))