changeset 52680:3614833210ba

(regex_compile): Free the stack when returning from function.
author Richard M. Stallman <rms@gnu.org>
date Tue, 30 Sep 2003 12:36:17 +0000
parents 32ebe48159a6
children 2036a4307b6c
files src/regex.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/regex.c	Tue Sep 30 12:33:19 2003 +0000
+++ b/src/regex.c	Tue Sep 30 12:36:17 2003 +0000
@@ -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'.  */