On Wed, Jun 10, 2020 at 5:57 PM <trix@xxxxxxxxxx> wrote: > > From: Tom Rix <trix@xxxxxxxxxx> > > 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 <trix@xxxxxxxxxx> Acked-by: Stephen Smalley <stephen.smalley.work@xxxxxxxxx>