This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e780cd3
)
Call cop_free on nullified cops too
author
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Tue, 15 Apr 2008 15:54:31 +0000
(15:54 +0000)
committer
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Tue, 15 Apr 2008 15:54:31 +0000
(15:54 +0000)
(this is a followup to 33687)
p4raw-id: //depot/perl@33695
op.c
patch
|
blob
|
blame
|
history
diff --git
a/op.c
b/op.c
index
6823cc9
..
ba9e2a5
100644
(file)
--- a/
op.c
+++ b/
op.c
@@
-502,7
+502,10
@@
Perl_op_free(pTHX_ OP *o)
/* COP* is not cleared by op_clear() so that we may track line
* numbers etc even after null() */
- if (type == OP_NEXTSTATE || type == OP_DBSTATE) {
+ if (type == OP_NEXTSTATE || type == OP_DBSTATE
+ || (type == OP_NULL /* the COP might have been null'ed */
+ && ((OPCODE)o->op_targ == OP_NEXTSTATE
+ || (OPCODE)o->op_targ == OP_DBSTATE))) {
cop_free((COP*)o);
}