develooper Front page | perl.perl5.changes | Postings from February 2021

[Perl/perl5] 0734d3: regcomp.c: Remove memory leak

Karl Williamson via perl5-changes
February 27, 2021 22:58
[Perl/perl5] 0734d3: regcomp.c: Remove memory leak
Message ID:
  Branch: refs/heads/smoke-me/khw-18604
  Commit: 0734d3cff02ed578ade3df0dc62f389bb3a5d9a6
  Author: Karl Williamson <>
  Date:   2021-02-27 (Sat, 27 Feb 2021)

  Changed paths:
    M regcomp.c

  Log Message:
  regcomp.c: Remove memory leak

This fixes GH #18604.  The symptoms of that there was a path through the
code where a particular SV did not get its reference count decremented.

I did an audit of the function and came up with several other
possiblities that are included in this commit.

Further, there would be leaks for some instances of finding syntax
errors in the input pattern, or when warnings are fatalized.  Those
would require mortalizing some SVs, but that is beyond the scope of this
commit. Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About