selinux/libsemanage
Christian Göttsche 3be312e0cf libsemanage: fix memory leak in semanage_user_roles
The output parameter `role_arr` of semanage_user_get_roles() is an array
of non-owned role names.  Since the array is never used again, as its
contents have been copied into the return value `roles`, free it.

Example leak report from useradd(8):

    Direct leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x5597624284a8 in __interceptor_calloc (./shadow/src/useradd+0xee4a8)
    #1 0x7f53aefcbbf9 in sepol_user_get_roles src/user_record.c:270:21
2023-05-03 09:15:34 -04:00
..
example
include libsemanage: always write kernel policy when check_ext_changes is specified 2022-06-30 21:09:00 +02:00
man Use IANA-managed domain example.com in examples 2021-11-15 10:53:27 +01:00
src libsemanage: fix memory leak in semanage_user_roles 2023-05-03 09:15:34 -04:00
tests libsemanage/tests: rename bool identifiers 2023-05-03 09:15:26 -04:00
utils Always use /usr/bin/python3 in Python scripts 2019-02-20 16:43:27 +01:00
.gitignore
LICENSE docs: provide a top level LICENSE file 2022-10-05 08:20:38 -04:00
Makefile
VERSION Update VERSIONs to 3.5 for release. 2023-02-23 05:16:11 -08:00