On Fri, Nov 29, 2024 at 6:31 AM Christian Göttsche <cgoettsche@xxxxxxxxxxxxx> wrote: > > From: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> > > 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@xxxxxxxxxxxxxx> Acked-by: James Carter <jwcart2@xxxxxxxxx> > --- > libselinux/utils/sefcontext_compile.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libselinux/utils/sefcontext_compile.c b/libselinux/utils/sefcontext_compile.c > index 23d31274..5d7ab301 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) > - return rc; > + goto err; > > rc = write_spec_node(bin_file, do_write_precompregex, data->root, stab); > if (rc) > -- > 2.45.2 > >