# HG changeset patch # User Richard Stallman # Date 1064925377 0 # Node ID 0bb62f52421d3b34544225b699f39e8d475bd8da # Parent 27c6099e6a9fbb58f33d7e57bc4ab408c50fd779 (regex_compile): Free the stack when returning from function. diff --git a/regex.c b/regex.c --- a/regex.c +++ b/regex.c @@ -3514,8 +3514,6 @@ if (syntax & RE_NO_POSIX_BACKTRACKING) BUF_PUSH (succeed); - free (compile_stack.stack); - /* We have succeeded; set the length of the buffer. */ bufp->used = b - bufp->buffer; @@ -3555,7 +3553,7 @@ } #endif /* not MATCH_MAY_ALLOCATE */ - return REG_NOERROR; + FREE_STACK_RETURN (REG_NOERROR); } /* regex_compile */ /* Subroutines for `regex_compile'. */