diff options
| author | Richard M. Stallman | 2003-09-30 12:36:17 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-09-30 12:36:17 +0000 |
| commit | 7c67c9f660052c903a555c5d205e83c274cfd80a (patch) | |
| tree | 3b219834f9de575a3e3fa70a5fb99d01ce62faa7 /src | |
| parent | 34894ec3c701c36b964b3afd804688909136881e (diff) | |
| download | emacs-7c67c9f660052c903a555c5d205e83c274cfd80a.tar.gz emacs-7c67c9f660052c903a555c5d205e83c274cfd80a.zip | |
(regex_compile): Free the stack when returning from function.
Diffstat (limited to 'src')
| -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) | |||
| 3514 | if (syntax & RE_NO_POSIX_BACKTRACKING) | 3514 | if (syntax & RE_NO_POSIX_BACKTRACKING) |
| 3515 | BUF_PUSH (succeed); | 3515 | BUF_PUSH (succeed); |
| 3516 | 3516 | ||
| 3517 | free (compile_stack.stack); | ||
| 3518 | |||
| 3519 | /* We have succeeded; set the length of the buffer. */ | 3517 | /* We have succeeded; set the length of the buffer. */ |
| 3520 | bufp->used = b - bufp->buffer; | 3518 | bufp->used = b - bufp->buffer; |
| 3521 | 3519 | ||
| @@ -3555,7 +3553,7 @@ regex_compile (pattern, size, syntax, bufp) | |||
| 3555 | } | 3553 | } |
| 3556 | #endif /* not MATCH_MAY_ALLOCATE */ | 3554 | #endif /* not MATCH_MAY_ALLOCATE */ |
| 3557 | 3555 | ||
| 3558 | return REG_NOERROR; | 3556 | FREE_STACK_RETURN (REG_NOERROR); |
| 3559 | } /* regex_compile */ | 3557 | } /* regex_compile */ |
| 3560 | 3558 | ||
| 3561 | /* Subroutines for `regex_compile'. */ | 3559 | /* Subroutines for `regex_compile'. */ |