mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 18:17:09 +00:00
* fix a few more memory leaks
* undocumented symbol table dumping short options weren't actually accepted by the parser.
This commit is contained in:
parent
1b069745b3
commit
f9c5756b4d
@ -169,6 +169,8 @@ void pwarn(char *fmt, ...)
|
||||
va_start(arg, fmt);
|
||||
vfprintf(stderr, newfmt, arg);
|
||||
va_end(arg);
|
||||
|
||||
free(newfmt);
|
||||
}
|
||||
|
||||
static int process_args(int argc, char *argv[])
|
||||
@ -177,7 +179,7 @@ static int process_args(int argc, char *argv[])
|
||||
int count = 0;
|
||||
option = OPTION_ADD;
|
||||
|
||||
while ((c = getopt_long(argc, argv, "adf:hrRvpI:b:BCNSm:qn:", long_options, &o)) != -1)
|
||||
while ((c = getopt_long(argc, argv, "adf:hrRvpI:b:BCDENSm:qn:", long_options, &o)) != -1)
|
||||
{
|
||||
switch (c) {
|
||||
case 0:
|
||||
|
@ -728,6 +728,10 @@ void free_policy(struct codomain *cod)
|
||||
aare_delete_ruleset(cod->dfarules);
|
||||
if (cod->dfa)
|
||||
free(cod->dfa);
|
||||
if (cod->name)
|
||||
free(cod->name);
|
||||
if (cod->namespace)
|
||||
free(cod->namespace);
|
||||
free(cod);
|
||||
}
|
||||
|
||||
|
@ -110,6 +110,7 @@ static void free_symtab(struct symtab *symtab)
|
||||
free(symtab->var_name);
|
||||
|
||||
free_values(symtab->values);
|
||||
free_values(symtab->expanded);
|
||||
free(symtab);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user