mirror of
https://github.com/SELinuxProject/selinux
synced 2025-04-17 21:05:22 +00:00
libselinux/utils: use correct error handling
Instead of returning directly goto the err label, which prints a message and closes the opened file stream. Found by clang-analyzer. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
3ff5f9efdb
commit
2db6d12a6c
@ -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)
|
||||
return rc;
|
||||
goto err;
|
||||
|
||||
rc = write_spec_node(bin_file, do_write_precompregex, data->root, stab);
|
||||
if (rc)
|
||||
|
Loading…
Reference in New Issue
Block a user