diff mbox series

[2/9] Revert "libselinux/utils: use correct error handling"

Message ID 20241211161417.126236-2-jwcart2@gmail.com (mailing list archive)
State Rejected
Delegated to: Petr Lautrbach
Headers show
Series [1/9] Revert "libselinux/utils: drop reachable assert in sefcontext_compile" | expand

Commit Message

James Carter Dec. 11, 2024, 4:13 p.m. UTC
This reverts commit 2db6d12a6cf097b5762d803693eb3182add19d48.

Needed to revert commit 92306daf5219e73f6e8bc9fc7699399457999bcd
"libselinux: rework selabel_file(5) database", which broke Android
file_context matching.

Signed-off-by: James Carter <jwcart2@gmail.com>
---
 libselinux/utils/sefcontext_compile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libselinux/utils/sefcontext_compile.c b/libselinux/utils/sefcontext_compile.c
index 5d7ab301..23d31274 100644
--- a/libselinux/utils/sefcontext_compile.c
+++ b/libselinux/utils/sefcontext_compile.c
@@ -471,7 +471,7 @@  static int write_binary_file(const struct saved_data *data, const struct sidtab
 	/* write context table */
 	rc = write_sidtab(bin_file, stab);
 	if (rc)
-		goto err;
+		return rc;
 
 	rc = write_spec_node(bin_file, do_write_precompregex, data->root, stab);
 	if (rc)