mirror of
https://github.com/topjohnwu/selinux.git
synced 2025-02-15 08:47:55 +00:00
semodule_package: do not leak memory when using -u or -s
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@m4x.org>
This commit is contained in:
parent
ed51e23f15
commit
3228889620
@ -257,5 +257,7 @@ int main(int argc, char **argv)
|
||||
free(file_contexts);
|
||||
free(outfile);
|
||||
free(module);
|
||||
free(seusers);
|
||||
free(user_extra);
|
||||
exit(0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user