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

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

From:
Karl Williamson via perl5-changes
Date:
February 27, 2021 22:58
Subject:
[Perl/perl5] 0734d3: regcomp.c: Remove memory leak
Message ID:
Perl/perl5/push/refs/heads/smoke-me/khw-18604/000000-0734d3@github.com
  Branch: refs/heads/smoke-me/khw-18604
  Home:   https://github.com/Perl/perl5
  Commit: 0734d3cff02ed578ade3df0dc62f389bb3a5d9a6
      https://github.com/Perl/perl5/commit/0734d3cff02ed578ade3df0dc62f389bb3a5d9a6
  Author: Karl Williamson <khw@cpan.org>
  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.





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About