summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-03-17 14:32:39 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-03-17 14:32:39 +0000
commit2f5f431073b5b24413f4294cd8dfdc4b94f4713d (patch)
tree1280ecb4001ea3530a9d6a669c705acea195b729 /regcomp.c
parent6b35f0c3219dc9865b9dcb12400da7e37074c14e (diff)
downloadperl-2f5f431073b5b24413f4294cd8dfdc4b94f4713d.tar.gz
[win32] propagate bugfix @ change831 from asperl
p4raw-id: //depot/win32/perl@832
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/regcomp.c b/regcomp.c
index 3581a5da3c..0f48976db8 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -2574,12 +2574,13 @@ pregfree(struct regexp *r)
Safefree(r->precomp);
if (r->subbase)
Safefree(r->subbase);
- if (r->substrs)
+ if (r->substrs) {
+ if (r->anchored_substr)
+ SvREFCNT_dec(r->anchored_substr);
+ if (r->float_substr)
+ SvREFCNT_dec(r->float_substr);
Safefree(r->substrs);
- if (r->anchored_substr)
- SvREFCNT_dec(r->anchored_substr);
- if (r->float_substr)
- SvREFCNT_dec(r->float_substr);
+ }
if (r->data) {
int n = r->data->count;
while (--n >= 0) {