diff options
author | Richard M. Stallman <rms@gnu.org> | 2003-09-30 12:36:17 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2003-09-30 12:36:17 +0000 |
commit | 7c67c9f660052c903a555c5d205e83c274cfd80a (patch) | |
tree | 3b219834f9de575a3e3fa70a5fb99d01ce62faa7 /src/regex.c | |
parent | 34894ec3c701c36b964b3afd804688909136881e (diff) | |
download | emacs-7c67c9f660052c903a555c5d205e83c274cfd80a.tar.gz |
(regex_compile): Free the stack when returning from function.
Diffstat (limited to 'src/regex.c')
-rw-r--r-- | src/regex.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/regex.c b/src/regex.c index a31bb490ff2..a57ae00d14f 100644 --- a/src/regex.c +++ b/src/regex.c @@ -3514,8 +3514,6 @@ regex_compile (pattern, size, syntax, bufp) 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 @@ regex_compile (pattern, size, syntax, bufp) } #endif /* not MATCH_MAY_ALLOCATE */ - return REG_NOERROR; + FREE_STACK_RETURN (REG_NOERROR); } /* regex_compile */ /* Subroutines for `regex_compile'. */ |