diff options
author | Artur Bergman <sky@nanisky.com> | 2001-08-27 05:37:17 +0000 |
---|---|---|
committer | Artur Bergman <sky@nanisky.com> | 2001-08-27 05:37:17 +0000 |
commit | 13137afc7675869b45e226f8338b8d593c7bf6c8 (patch) | |
tree | 12a6976a02f9cb99d99738f4fd7a4c71488ddb40 /perl.c | |
parent | 444e39b5b9f36cd0f60283ca4c60fc108157921f (diff) | |
download | perl-13137afc7675869b45e226f8338b8d593c7bf6c8.tar.gz |
Plugs a memory leak on destruction of regular expressions
introcued by #11274.
PL_regex_padav now has an AV as it's first entry with a list
of freed regex_padav slots that it will reuse on creating
new PMOPs.
p4raw-id: //depot/perl@11755
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -284,7 +284,9 @@ perl_construct(pTHXx) PL_modglobal = newHV(); /* pointers to per-interpreter module globals */ PL_errors = newSVpvn("",0); #ifdef USE_ITHREADS - PL_regex_padav = newAV(); + PL_regex_padav = newAV(); + av_push(PL_regex_padav,(SV*)newAV()); /* First entry is an array of empty elements */ + PL_regex_pad = AvARRAY(PL_regex_padav); #endif #ifdef USE_REENTRANT_API New(31337, PL_reentrant_buffer,1, REBUF); |