about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-07-10 22:02:15 +0000
committerUlrich Drepper <drepper@redhat.com>2005-07-10 22:02:15 +0000
commit96c91d1cfed31c5e1dc3fd776837e1cae9a74165 (patch)
treee7e069af82ff09766a8390c47cde18b4305ecb9b
parentd075e8ba45d23ca4798cbe803cf4062a12246fe6 (diff)
downloadglibc-96c91d1cfed31c5e1dc3fd776837e1cae9a74165.tar.gz
glibc-96c91d1cfed31c5e1dc3fd776837e1cae9a74165.tar.xz
glibc-96c91d1cfed31c5e1dc3fd776837e1cae9a74165.zip
2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
	* posix/regcomp.c (re_compile_internal): __libc_lock_init
	after init_dfa.
-rw-r--r--ChangeLog5
-rw-r--r--posix/regcomp.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 41c148f53a..28997af4d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-27  Carlos O'Donell <carlos@systemhalted.org>
+
+	* posix/regcomp.c (re_compile_internal): __libc_lock_init
+	after init_dfa.
+
 2005-07-08  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/x86_64/fpu/s_sincosl.S: Use retq not ret.  Remove
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 2053b024dc..37e06797ac 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -774,8 +774,6 @@ re_compile_internal (preg, pattern, length, syntax)
     }
   preg->used = sizeof (re_dfa_t);
 
-  __libc_lock_init (dfa->lock);
-
   err = init_dfa (dfa, length);
   if (BE (err != REG_NOERROR, 0))
     {
@@ -789,6 +787,8 @@ re_compile_internal (preg, pattern, length, syntax)
   strncpy (dfa->re_str, pattern, length + 1);
 #endif
 
+  __libc_lock_init (dfa->lock);
+
   err = re_string_construct (&regexp, pattern, length, preg->translate,
 			     syntax & RE_ICASE, dfa);
   if (BE (err != REG_NOERROR, 0))