>> +++ b/security/selinux/ss/services.c
>> @@ -2888,8 +2888,12 @@ int security_get_bools(struct selinux_state *state,
>> if (*names) {
>> for (i = 0; i < *len; i++)
>> kfree((*names)[i]);
>> + kfree(names);
> kfree(*names)?
Yes.
>
On Wed, Jun 10, 2020 at 2:10 PM wrote:
>
> From: Tom Rix
>
> 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]);
>
From: Tom Rix
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]);
^~~~
3 matches
Mail list logo