summaryrefslogtreecommitdiff
path: root/perly.c
diff options
context:
space:
mode:
Diffstat (limited to 'perly.c')
-rw-r--r--perly.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/perly.c b/perly.c
index 36b51c02e7..d03d3dee98 100644
--- a/perly.c
+++ b/perly.c
@@ -1386,6 +1386,9 @@ yyparse()
#endif
struct ysv *ysave;
+#ifdef USE_ITHREADS
+ ENTER; /* force yydestruct() before we return */
+#endif
New(73, ysave, 1, struct ysv);
SAVEDESTRUCTOR_X(yydestruct, ysave);
ysave->oldyydebug = yydebug;
@@ -2477,6 +2480,9 @@ yyoverflow:
yyabort:
retval = 1;
yyaccept:
+#ifdef USE_ITHREADS
+ LEAVE; /* force yydestruct() before we return */
+#endif
return retval;
}