diff --git a/parser/parser_main.c b/parser/parser_main.c index a42faec3f..570204fed 100644 --- a/parser/parser_main.c +++ b/parser/parser_main.c @@ -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: diff --git a/parser/parser_policy.c b/parser/parser_policy.c index 26379913e..d25634687 100644 --- a/parser/parser_policy.c +++ b/parser/parser_policy.c @@ -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); } diff --git a/parser/parser_symtab.c b/parser/parser_symtab.c index 03a8084d0..fab847096 100644 --- a/parser/parser_symtab.c +++ b/parser/parser_symtab.c @@ -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); }