From: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> --- libsemanage/src/direct_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsemanage/src/direct_api.c b/libsemanage/src/direct_api.c index 66a6fa66..a262fe09 100644 --- a/libsemanage/src/direct_api.c +++ b/libsemanage/src/direct_api.c @@ -1353,7 +1353,9 @@ static int semanage_direct_commit(semanage_handle_t * sh) cil_set_policy_version(cildb, sh->conf->policyvers); if (sh->conf->handle_unknown != -1) { - cil_set_handle_unknown(cildb, sh->conf->handle_unknown); + retval = cil_set_handle_unknown(cildb, sh->conf->handle_unknown); + if (retval < 0) + goto cleanup; } retval = semanage_load_files(sh, cildb, mod_filenames, num_modinfos); -- 2.45.2