2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
authorUlrich Drepper <drepper@redhat.com>
Sun, 10 Jul 2005 22:02:15 +0000 (22:02 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 10 Jul 2005 22:02:15 +0000 (22:02 +0000)
* posix/regcomp.c (re_compile_internal): __libc_lock_init
after init_dfa.

ChangeLog
posix/regcomp.c

index 41c148f..28997af 100644 (file)
--- 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
index 2053b02..37e0679 100644 (file)
@@ -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))