diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-01-10 23:32:27 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-01-10 23:32:27 +0000 |
commit | 110f3028c15a78b9155d8d56077236a8a2a126d0 (patch) | |
tree | ad9a40f93f3cfcc5c6ecd18a43aaf0419cafcd18 | |
parent | 61525e559c4b36c0ec96dac11ea3cd5199cafb78 (diff) | |
download | perl-110f3028c15a78b9155d8d56077236a8a2a126d0.tar.gz |
Change 32899 missed undoing the reference count increase when the SV
is popped off the AV.
"There's Something Wrong with our Bloody Leak Checking Today", as
Beattie didn't put it. It seems that we really can't check for leaking
scalars in perl_destruct, because we do our damndest to free them
brute force, rather than by undefining the symbol table and seeing
what sticks around.
p4raw-id: //depot/perl@32942
-rw-r--r-- | op.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3368,8 +3368,12 @@ Perl_newPMOP(pTHX_ I32 type, I32 flags) #ifdef USE_ITHREADS if (av_len((AV*) PL_regex_pad[0]) > -1) { SV * const repointer = av_pop((AV*)PL_regex_pad[0]); - pmop->op_pmoffset = SvIV(repointer); + const IV offset = SvIV(repointer); + pmop->op_pmoffset = offset; sv_setiv(repointer,0); + assert(repointer == PL_regex_pad[offset]); + /* One reference remains, in PL_regex_pad[offset] */ + SvREFCNT_dec(repointer); } else { SV * const repointer = newSViv(0); av_push(PL_regex_padav, repointer); |