[Perl/perl5] 181300: S_cleanup_regmatch_info_aux - don't Safefree(NULL)

[email protected] (Richard Leach via perl5-changes) Thu, 16 Jul 2026 01:32:56 -0700
Newsgroups perl.perl5.changes
Message-ID <Perl/perl5/push/refs/heads/blead/[email protected]>
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 18130018e5fa1e5f179ef5558c005b4669d94486
      https://github.com/Perl/perl5/commit/18130018e5fa1e5f179ef5558c005b4669d94486
  Author: Richard Leach <[email protected]>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M regexec.c

  Log Message:
  -----------
  S_cleanup_regmatch_info_aux - don't Safefree(NULL)

One of the tasks of the `S_cleanup_regmatch_info_aux` destructor is to
free any `aux->poscache` allocation.

However, many regular expressions - such as a simple TRIE - don't cause
an allocation to occur. This commit adds a check to ensure that an
unnecessary function call isn't made in those instances.



To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications