summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl.c b/perl.c
index 51cb92757a..820f65d3bd 100644
--- a/perl.c
+++ b/perl.c
@@ -496,7 +496,10 @@ perl_destruct(pTHXx)
* flag is set in regexec.c:S_regtry
*/
SvFLAGS(resv) &= ~SVf_BREAK;
- }
+ }
+ else if(SvREPADTMP(resv)) {
+ SvREPADTMP_off(resv);
+ }
else {
ReREFCNT_dec(re);
}