On Wed, Jun 10, 2020 at 5:57 PM <t...@redhat.com> wrote:
>
> From: Tom Rix <t...@redhat.com>
>
> Clang's static analysis tool reports these double free memory errors.
>
> security/selinux/ss/services.c:2987:4: warning: Attempt to free released 
> memory [unix.Malloc]
>                         kfree(bnames[i]);
>                         ^~~~~~~~~~~~~~~~
> security/selinux/ss/services.c:2990:2: warning: Attempt to free released 
> memory [unix.Malloc]
>         kfree(bvalues);
>         ^~~~~~~~~~~~~~
>
> So improve the security_get_bools error handling by freeing these variables
> and setting their return pointers to NULL and the return len to 0
>
> Signed-off-by: Tom Rix <t...@redhat.com>

Acked-by: Stephen Smalley <stephen.smalley.w...@gmail.com>

Reply via email to