scan coverity findings
trufae opened this issue · 1 comments
trufae commented
I have updated mpc from the @radareorg repository and got some leaks and bugs reported by coverity. So i think is better to report it in here :) hope it helps
** CID 1453141: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 3445 in mpcaf_fold_regex()
________________________________________________________________________________________________________
*** CID 1453141: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 3445 in mpcaf_fold_regex()
3439 int mode = MPC_RE_DEFAULT;
3440
3441 (void)n;
3442 if (strchr(m, 'm')) { mode |= MPC_RE_MULTILINE; }
3443 if (strchr(m, 's')) { mode |= MPC_RE_DOTALL; }
3444 y = mpcf_unescape_regex(y);
CID 1453141: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_re_mode(y, mode)" leaks it.
3445 p = (st->flags & MPCA_LANG_WHITESPACE_SENSITIVE) ? mpc_re_mode(y, mode) : mpc_tok(mpc_re_mode(y, mode));
3446 free(y);
3447 free(m);
3448
3449 return mpca_state(mpca_tag(mpc_apply(p, mpcf_str_ast), "regex"));
3450 }
** CID 1453140: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 3720 in mpca_lang_st()
________________________________________________________________________________________________________
*** CID 1453140: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 3720 in mpca_lang_st()
3714 mpc_sym("!"),
3715 mpc_tok_brackets(mpc_int(), free),
3716 mpc_pass()),
3717 mpc_soft_delete
3718 ));
3719
CID 1453140: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_lift_val(st)" leaks it.
3720 mpc_define(Base, mpc_or(5,
3721 mpc_apply_to(mpc_tok(mpc_string_lit()), mpcaf_grammar_string, st),
3722 mpc_apply_to(mpc_tok(mpc_char_lit()), mpcaf_grammar_char, st),
3723 mpc_tok(mpc_and(3, mpcaf_fold_regex, mpc_regex_lit(), mpc_many(mpcf_strfold, mpc_oneof("ms")), mpc_lift_val(st), free, free)),
3724 mpc_apply_to(mpc_tok_braces(mpc_or(2, mpc_digits(), mpc_ident()), free), mpcaf_grammar_id, st),
3725 mpc_tok_parens(Grammar, mpc_soft_delete)
** CID 1453139: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2387 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453139: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2387 in mpc_re_mode()
2381 mpc_char('*'), mpc_char('+'), mpc_char('?'),
2382 mpc_brackets(mpc_int(), free),
2383 mpc_pass()),
2384 (mpc_dtor_t)mpc_delete
2385 ));
2386
CID 1453139: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_squares(Range, (mpc_dtor_t)mpc_delete)" leaks it.
2387 mpc_define(Base, mpc_or(4,
2388 mpc_parens(Regex, (mpc_dtor_t)mpc_delete),
2389 mpc_squares(Range, (mpc_dtor_t)mpc_delete),
2390 mpc_apply_to(mpc_escape(), mpcf_re_escape, &mode),
2391 mpc_apply_to(mpc_noneof(")|"), mpcf_re_escape, &mode)
2392 ));
** CID 1453138: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 3720 in mpca_lang_st()
________________________________________________________________________________________________________
*** CID 1453138: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 3720 in mpca_lang_st()
3714 mpc_sym("!"),
3715 mpc_tok_brackets(mpc_int(), free),
3716 mpc_pass()),
3717 mpc_soft_delete
3718 ));
3719
CID 1453138: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_and(3, mpcaf_fold_regex, mpc_regex_lit(), mpc_many(mpcf_strfold, mpc_oneof("ms")), mpc_lift_val(st), free, free)" leaks it.
3720 mpc_define(Base, mpc_or(5,
3721 mpc_apply_to(mpc_tok(mpc_string_lit()), mpcaf_grammar_string, st),
3722 mpc_apply_to(mpc_tok(mpc_char_lit()), mpcaf_grammar_char, st),
3723 mpc_tok(mpc_and(3, mpcaf_fold_regex, mpc_regex_lit(), mpc_many(mpcf_strfold, mpc_oneof("ms")), mpc_lift_val(st), free, free)),
3724 mpc_apply_to(mpc_tok_braces(mpc_or(2, mpc_digits(), mpc_ident()), free), mpcaf_grammar_id, st),
3725 mpc_tok_parens(Grammar, mpc_soft_delete)
** CID 1453137: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 3558 in mpca_grammar_st()
________________________________________________________________________________________________________
*** CID 1453137: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 3558 in mpca_grammar_st()
3552 mpc_sym("!"),
3553 mpc_tok_brackets(mpc_int(), free),
3554 mpc_pass()),
3555 mpc_soft_delete
3556 ));
3557
CID 1453137: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_and(3, mpcaf_fold_regex, mpc_regex_lit(), mpc_many(mpcf_strfold, mpc_oneof("ms")), mpc_lift_val(st), free, free)" leaks it.
3558 mpc_define(Base, mpc_or(5,
3559 mpc_apply_to(mpc_tok(mpc_string_lit()), mpcaf_grammar_string, st),
3560 mpc_apply_to(mpc_tok(mpc_char_lit()), mpcaf_grammar_char, st),
3561 mpc_tok(mpc_and(3, mpcaf_fold_regex, mpc_regex_lit(), mpc_many(mpcf_strfold, mpc_oneof("ms")), mpc_lift_val(st), free, free)),
3562 mpc_apply_to(mpc_tok_braces(mpc_or(2, mpc_digits(), mpc_ident()), free), mpcaf_grammar_id, st),
3563 mpc_tok_parens(Grammar, mpc_soft_delete)
** CID 1453136: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2399 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453136: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2399 in mpc_re_mode()
2393
2394 mpc_define(Range, mpc_apply(
2395 mpc_many(mpcf_strfold, mpc_or(2, mpc_escape(), mpc_noneof("]"))),
2396 mpcf_re_range
2397 ));
2398
CID 1453136: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_predictive(Regex)" leaks it.
2399 RegexEnclose = mpc_whole(mpc_predictive(Regex), (mpc_dtor_t)mpc_delete);
2400
2401 mpc_optimise(RegexEnclose);
2402 mpc_optimise(Regex);
2403 mpc_optimise(Term);
2404 mpc_optimise(Factor);
** CID 1453135: (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2387 in mpc_re_mode()
/shlr/mpc/mpc.c: 2387 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453135: (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2387 in mpc_re_mode()
2381 mpc_char('*'), mpc_char('+'), mpc_char('?'),
2382 mpc_brackets(mpc_int(), free),
2383 mpc_pass()),
2384 (mpc_dtor_t)mpc_delete
2385 ));
2386
CID 1453135: (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_apply_to(mpc_escape(), mpcf_re_escape, &mode)" leaks it.
2387 mpc_define(Base, mpc_or(4,
2388 mpc_parens(Regex, (mpc_dtor_t)mpc_delete),
2389 mpc_squares(Range, (mpc_dtor_t)mpc_delete),
2390 mpc_apply_to(mpc_escape(), mpcf_re_escape, &mode),
2391 mpc_apply_to(mpc_noneof(")|"), mpcf_re_escape, &mode)
2392 ));
/shlr/mpc/mpc.c: 2387 in mpc_re_mode()
2381 mpc_char('*'), mpc_char('+'), mpc_char('?'),
2382 mpc_brackets(mpc_int(), free),
2383 mpc_pass()),
2384 (mpc_dtor_t)mpc_delete
2385 ));
2386
CID 1453135: (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_apply_to(mpc_noneof(")|"), mpcf_re_escape, &mode)" leaks it.
2387 mpc_define(Base, mpc_or(4,
2388 mpc_parens(Regex, (mpc_dtor_t)mpc_delete),
2389 mpc_squares(Range, (mpc_dtor_t)mpc_delete),
2390 mpc_apply_to(mpc_escape(), mpcf_re_escape, &mode),
2391 mpc_apply_to(mpc_noneof(")|"), mpcf_re_escape, &mode)
2392 ));
** CID 1453134: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 3720 in mpca_lang_st()
________________________________________________________________________________________________________
*** CID 1453134: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 3720 in mpca_lang_st()
3714 mpc_sym("!"),
3715 mpc_tok_brackets(mpc_int(), free),
3716 mpc_pass()),
3717 mpc_soft_delete
3718 ));
3719
CID 1453134: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_many(mpcf_strfold, mpc_oneof("ms"))" leaks it.
3720 mpc_define(Base, mpc_or(5,
3721 mpc_apply_to(mpc_tok(mpc_string_lit()), mpcaf_grammar_string, st),
3722 mpc_apply_to(mpc_tok(mpc_char_lit()), mpcaf_grammar_char, st),
3723 mpc_tok(mpc_and(3, mpcaf_fold_regex, mpc_regex_lit(), mpc_many(mpcf_strfold, mpc_oneof("ms")), mpc_lift_val(st), free, free)),
3724 mpc_apply_to(mpc_tok_braces(mpc_or(2, mpc_digits(), mpc_ident()), free), mpcaf_grammar_id, st),
3725 mpc_tok_parens(Grammar, mpc_soft_delete)
** CID 1453133: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2387 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453133: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2387 in mpc_re_mode()
2381 mpc_char('*'), mpc_char('+'), mpc_char('?'),
2382 mpc_brackets(mpc_int(), free),
2383 mpc_pass()),
2384 (mpc_dtor_t)mpc_delete
2385 ));
2386
CID 1453133: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_parens(Regex, (mpc_dtor_t)mpc_delete)" leaks it.
2387 mpc_define(Base, mpc_or(4,
2388 mpc_parens(Regex, (mpc_dtor_t)mpc_delete),
2389 mpc_squares(Range, (mpc_dtor_t)mpc_delete),
2390 mpc_apply_to(mpc_escape(), mpcf_re_escape, &mode),
2391 mpc_apply_to(mpc_noneof(")|"), mpcf_re_escape, &mode)
2392 ));
** CID 1453132: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2378 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453132: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2378 in mpc_re_mode()
2372 mpc_maybe(mpc_and(2, mpcf_snd_free, mpc_char('|'), Regex, free)),
2373 (mpc_dtor_t)mpc_delete
2374 ));
2375
2376 mpc_define(Term, mpc_many(mpcf_re_and, Factor));
2377
CID 1453132: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_or(5, mpc_char('*'), mpc_char('+'), mpc_char('?'), mpc_brackets(mpc_int(), free), mpc_pass())" leaks it.
2378 mpc_define(Factor, mpc_and(2, mpcf_re_repeat,
2379 Base,
2380 mpc_or(5,
2381 mpc_char('*'), mpc_char('+'), mpc_char('?'),
2382 mpc_brackets(mpc_int(), free),
2383 mpc_pass()),
** CID 1453131: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2394 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453131: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2394 in mpc_re_mode()
2388 mpc_parens(Regex, (mpc_dtor_t)mpc_delete),
2389 mpc_squares(Range, (mpc_dtor_t)mpc_delete),
2390 mpc_apply_to(mpc_escape(), mpcf_re_escape, &mode),
2391 mpc_apply_to(mpc_noneof(")|"), mpcf_re_escape, &mode)
2392 ));
2393
CID 1453131: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_escape()" leaks it.
2394 mpc_define(Range, mpc_apply(
2395 mpc_many(mpcf_strfold, mpc_or(2, mpc_escape(), mpc_noneof("]"))),
2396 mpcf_re_range
2397 ));
2398
2399 RegexEnclose = mpc_whole(mpc_predictive(Regex), (mpc_dtor_t)mpc_delete);
** CID 1453130: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2420 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453130: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2420 in mpc_re_mode()
2414 }
2415
2416 mpc_cleanup(6, RegexEnclose, Regex, Term, Factor, Base, Range);
2417
2418 mpc_optimise(r.output);
2419
CID 1453130: Resource leaks (RESOURCE_LEAK)
Variable "RegexEnclose" going out of scope leaks the storage it points to.
2420 return r.output;
2421
2422 }
2423
2424 /*
2425 ** Common Fold Functions
** CID 1453129: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2378 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453129: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2378 in mpc_re_mode()
2372 mpc_maybe(mpc_and(2, mpcf_snd_free, mpc_char('|'), Regex, free)),
2373 (mpc_dtor_t)mpc_delete
2374 ));
2375
2376 mpc_define(Term, mpc_many(mpcf_re_and, Factor));
2377
CID 1453129: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_pass()" leaks it.
2378 mpc_define(Factor, mpc_and(2, mpcf_re_repeat,
2379 Base,
2380 mpc_or(5,
2381 mpc_char('*'), mpc_char('+'), mpc_char('?'),
2382 mpc_brackets(mpc_int(), free),
2383 mpc_pass()),
** CID 1453128: (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2370 in mpc_re_mode()
/shlr/mpc/mpc.c: 2378 in mpc_re_mode()
/shlr/mpc/mpc.c: 2378 in mpc_re_mode()
/shlr/mpc/mpc.c: 2378 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453128: (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2370 in mpc_re_mode()
2364 Regex = mpc_new("regex");
2365 Term = mpc_new("term");
2366 Factor = mpc_new("factor");
2367 Base = mpc_new("base");
2368 Range = mpc_new("range");
2369
CID 1453128: (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_char('|')" leaks it.
2370 mpc_define(Regex, mpc_and(2, mpcf_re_or,
2371 Term,
2372 mpc_maybe(mpc_and(2, mpcf_snd_free, mpc_char('|'), Regex, free)),
2373 (mpc_dtor_t)mpc_delete
2374 ));
2375
/shlr/mpc/mpc.c: 2378 in mpc_re_mode()
2372 mpc_maybe(mpc_and(2, mpcf_snd_free, mpc_char('|'), Regex, free)),
2373 (mpc_dtor_t)mpc_delete
2374 ));
2375
2376 mpc_define(Term, mpc_many(mpcf_re_and, Factor));
2377
CID 1453128: (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_char('+')" leaks it.
2378 mpc_define(Factor, mpc_and(2, mpcf_re_repeat,
2379 Base,
2380 mpc_or(5,
2381 mpc_char('*'), mpc_char('+'), mpc_char('?'),
2382 mpc_brackets(mpc_int(), free),
2383 mpc_pass()),
/shlr/mpc/mpc.c: 2378 in mpc_re_mode()
2372 mpc_maybe(mpc_and(2, mpcf_snd_free, mpc_char('|'), Regex, free)),
2373 (mpc_dtor_t)mpc_delete
2374 ));
2375
2376 mpc_define(Term, mpc_many(mpcf_re_and, Factor));
2377
CID 1453128: (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_char('*')" leaks it.
2378 mpc_define(Factor, mpc_and(2, mpcf_re_repeat,
2379 Base,
2380 mpc_or(5,
2381 mpc_char('*'), mpc_char('+'), mpc_char('?'),
2382 mpc_brackets(mpc_int(), free),
2383 mpc_pass()),
/shlr/mpc/mpc.c: 2378 in mpc_re_mode()
2372 mpc_maybe(mpc_and(2, mpcf_snd_free, mpc_char('|'), Regex, free)),
2373 (mpc_dtor_t)mpc_delete
2374 ));
2375
2376 mpc_define(Term, mpc_many(mpcf_re_and, Factor));
2377
CID 1453128: (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_char('?')" leaks it.
2378 mpc_define(Factor, mpc_and(2, mpcf_re_repeat,
2379 Base,
2380 mpc_or(5,
2381 mpc_char('*'), mpc_char('+'), mpc_char('?'),
2382 mpc_brackets(mpc_int(), free),
2383 mpc_pass()),
** CID 1453127: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2370 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453127: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2370 in mpc_re_mode()
2364 Regex = mpc_new("regex");
2365 Term = mpc_new("term");
2366 Factor = mpc_new("factor");
2367 Base = mpc_new("base");
2368 Range = mpc_new("range");
2369
CID 1453127: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_maybe(mpc_and(2, mpcf_snd_free, mpc_char('|'), Regex, free))" leaks it.
2370 mpc_define(Regex, mpc_and(2, mpcf_re_or,
2371 Term,
2372 mpc_maybe(mpc_and(2, mpcf_snd_free, mpc_char('|'), Regex, free)),
2373 (mpc_dtor_t)mpc_delete
2374 ));
2375
** CID 1453126: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2394 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453126: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2394 in mpc_re_mode()
2388 mpc_parens(Regex, (mpc_dtor_t)mpc_delete),
2389 mpc_squares(Range, (mpc_dtor_t)mpc_delete),
2390 mpc_apply_to(mpc_escape(), mpcf_re_escape, &mode),
2391 mpc_apply_to(mpc_noneof(")|"), mpcf_re_escape, &mode)
2392 ));
2393
CID 1453126: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_noneof("]")" leaks it.
2394 mpc_define(Range, mpc_apply(
2395 mpc_many(mpcf_strfold, mpc_or(2, mpc_escape(), mpc_noneof("]"))),
2396 mpcf_re_range
2397 ));
2398
2399 RegexEnclose = mpc_whole(mpc_predictive(Regex), (mpc_dtor_t)mpc_delete);
** CID 1453125: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2378 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453125: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2378 in mpc_re_mode()
2372 mpc_maybe(mpc_and(2, mpcf_snd_free, mpc_char('|'), Regex, free)),
2373 (mpc_dtor_t)mpc_delete
2374 ));
2375
2376 mpc_define(Term, mpc_many(mpcf_re_and, Factor));
2377
CID 1453125: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_int()" leaks it.
2378 mpc_define(Factor, mpc_and(2, mpcf_re_repeat,
2379 Base,
2380 mpc_or(5,
2381 mpc_char('*'), mpc_char('+'), mpc_char('?'),
2382 mpc_brackets(mpc_int(), free),
2383 mpc_pass()),
** CID 1453124: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2420 in mpc_re_mode()
________________________________________________________________________________________________________
*** CID 1453124: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 2420 in mpc_re_mode()
2414 }
2415
2416 mpc_cleanup(6, RegexEnclose, Regex, Term, Factor, Base, Range);
2417
2418 mpc_optimise(r.output);
2419
CID 1453124: Resource leaks (RESOURCE_LEAK)
Variable "Base" going out of scope leaks the storage it points to.
2420 return r.output;
2421
2422 }
2423
2424 /*
2425 ** Common Fold Functions
** CID 1453123: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 3558 in mpca_grammar_st()
________________________________________________________________________________________________________
*** CID 1453123: Resource leaks (RESOURCE_LEAK)
/shlr/mpc/mpc.c: 3558 in mpca_grammar_st()
3552 mpc_sym("!"),
3553 mpc_tok_brackets(mpc_int(), free),
3554 mpc_pass()),
3555 mpc_soft_delete
3556 ));
3557
CID 1453123: Resource leaks (RESOURCE_LEAK)
Failing to save or free storage allocated by "mpc_tok(mpc_and(3, mpcaf_fold_regex, mpc_regex_lit(), mpc_many(mpcf_strfold, mpc_oneof("ms")), mpc_lift_val(st), free, free))" leaks it.
3558 mpc_define(Base, mpc_or(5,
3559 mpc_apply_to(mpc_tok(mpc_string_lit()), mpcaf_grammar_string, st),
3560 mpc_apply_to(mpc_tok(mpc_char_lit()), mpcaf_grammar_char, st),
3561 mpc_tok(mpc_and(3, mpcaf_fold_regex, mpc_regex_lit(), mpc_many(mpcf_strfold, mpc_oneof("ms")), mpc_lift_val(st), free, free)),
3562 mpc_apply_to(mpc_tok_braces(mpc_or(2, mpc_digits(), mpc_ident()), free), mpcaf_grammar_id, st),
3563 mpc_tok_parens(Grammar, mpc_soft_delete)
orangeduck commented
Lots of these look like false positives - i.e. the destructor such as free
is getting stored somewhere and will be used to free the memory later. Perhaps worth verifying these in valgrind?