diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-10-18 18:11:57 +0000 |
---|---|---|
committer | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-10-18 18:11:57 +0000 |
commit | b023a8eeff463528d4a2b46396f79056c0ef9677 (patch) | |
tree | beb4cb6bd75456bdb5f3b3b3934710b5480fea1f | |
parent | a954f6ee3112c0edfbc59783d1b424d995122784 (diff) | |
download | perl-b023a8eeff463528d4a2b46396f79056c0ef9677.tar.gz |
Fix memory leak in // caused by single-char character class
optimization. This was most probably introduced with #28262.
This change fixes perl #59516.
p4raw-id: //depot/perl@34507
-rw-r--r-- | regcomp.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -8350,6 +8350,9 @@ parseit: *STRING(ret)= (char)value; STR_LEN(ret)= 1; RExC_emit += STR_SZ(1); + if (listsv) { + SvREFCNT_dec(listsv); + } return ret; } /* optimize case-insensitive simple patterns (e.g. /[a-z]/i) */ |