When using -u and -s options, semodule_package's main() allocates user_extra and seusers to hold the argument values. These allocated memory blocks are not freed when main() exits, which leads gcc's Address Sanitizer to report a memory leak. This occurs for example when building refpolicy base.pp module. Signed-off-by: Nicolas Iooss <nicolas.iooss@xxxxxxx> --- semodule-utils/semodule_package/semodule_package.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/semodule-utils/semodule_package/semodule_package.c b/semodule-utils/semodule_package/semodule_package.c index e472054826a3..a25daf59f9e7 100644 --- a/semodule-utils/semodule_package/semodule_package.c +++ b/semodule-utils/semodule_package/semodule_package.c @@ -257,5 +257,7 @@ int main(int argc, char **argv) free(file_contexts); free(outfile); free(module); + free(seusers); + free(user_extra); exit(0); } -- 2.11.1 _______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.