| 441 | } |
| 442 | |
| 443 | static void free_pcre2_pattern(struct grep_pat *p) |
| 444 | { |
| 445 | pcre2_compile_context_free(p->pcre2_compile_context); |
| 446 | pcre2_code_free(p->pcre2_pattern); |
| 447 | pcre2_match_data_free(p->pcre2_match_data); |
| 448 | #ifdef GIT_PCRE2_VERSION_10_34_OR_HIGHER |
| 449 | pcre2_maketables_free(p->pcre2_general_context, p->pcre2_tables); |
| 450 | #else |
| 451 | free((void *)p->pcre2_tables); |
| 452 | #endif |
| 453 | pcre2_general_context_free(p->pcre2_general_context); |
| 454 | } |
| 455 | #else /* !USE_LIBPCRE2 */ |
| 456 | static void compile_pcre2_pattern(struct grep_pat *p UNUSED, |
| 457 | const struct grep_opt *opt UNUSED) |