aboutsummaryrefslogtreecommitdiff
path: root/posix/regcomp.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-01-16 17:27:50 +0000
committerUlrich Drepper <drepper@redhat.com>2003-01-16 17:27:50 +0000
commitca3c505e44d0b8d3a0c5e8231cde88e0cbee09e3 (patch)
tree2031bba06df9254bdb6780792d877322e58dd9c7 /posix/regcomp.c
parent4dd98447becf0335662dfe4dc9b6261f3a376b65 (diff)
downloadglibc-ca3c505e44d0b8d3a0c5e8231cde88e0cbee09e3.tar
glibc-ca3c505e44d0b8d3a0c5e8231cde88e0cbee09e3.tar.gz
glibc-ca3c505e44d0b8d3a0c5e8231cde88e0cbee09e3.tar.bz2
glibc-ca3c505e44d0b8d3a0c5e8231cde88e0cbee09e3.zip
(re_compile_internal): If clearing buffer, clear allocated too.
Diffstat (limited to 'posix/regcomp.c')
-rw-r--r--posix/regcomp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 97ec6e32f0..12724e4605 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -752,6 +752,7 @@ re_compile_internal (preg, pattern, length, syntax)
{
re_free (dfa);
preg->buffer = NULL;
+ preg->allocated = 0;
return err;
}
#ifdef DEBUG
@@ -765,6 +766,7 @@ re_compile_internal (preg, pattern, length, syntax)
{
re_free (dfa);
preg->buffer = NULL;
+ preg->allocated = 0;
return err;
}
@@ -792,6 +794,7 @@ re_compile_internal (preg, pattern, length, syntax)
re_compile_internal_free_return:
free_dfa_content (dfa);
preg->buffer = NULL;
+ preg->allocated = 0;
}
return err;