On Fri, Jun 10, 2022 at 11:12 AM Christian Göttsche <cgzones@xxxxxxxxxxxxxx> wrote: > > The parameter `reason` of `context_struct_compute_av()` is optional and > can be passed in as NULL, like from `type_attribute_bounds_av()`. > > Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> Acked-by: James Carter <jwcart2@xxxxxxxxx> > --- > libsepol/src/services.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libsepol/src/services.c b/libsepol/src/services.c > index d7510e9d..24412d83 100644 > --- a/libsepol/src/services.c > +++ b/libsepol/src/services.c > @@ -894,7 +894,8 @@ static void type_attribute_bounds_av(context_struct_t *scontext, > /* mask violated permissions */ > avd->allowed &= ~masked; > > - *reason |= SEPOL_COMPUTEAV_BOUNDS; > + if (reason) > + *reason |= SEPOL_COMPUTEAV_BOUNDS; > } > > /* > -- > 2.36.1 >