Change 31483 by [EMAIL PROTECTED] on 2007/06/28 00:01:54
Free memory in case of error/failure to compile.
Hopefully valgrind will notice and like. :-)
Affected files ...
... //depot/perl/regcomp.c#596 edit
Differences ...
==== //depot/perl/regcomp.c#596 (text) ====
Index: perl/regcomp.c
--- perl/regcomp.c#595~31455~ 2007-06-24 08:46:40.000000000 -0700
+++ perl/regcomp.c 2007-06-27 17:01:54.000000000 -0700
@@ -4321,9 +4321,10 @@
/* Store the count of eval-groups for security checks: */
RExC_rx->seen_evals = RExC_seen_evals;
REGC((U8)REG_MAGIC, (char*) RExC_emit++);
- if (reg(pRExC_state, 0, &flags,1) == NULL)
+ if (reg(pRExC_state, 0, &flags,1) == NULL) {
+ ReREFCNT_dec(r);
return(NULL);
-
+ }
/* XXXX To minimize changes to RE engine we always allocate
3-units-long substrs field. */
Newx(r->substrs, 1, struct reg_substr_data);
End of Patch.