]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_dl_open): Correct test for extending global scope array.
authorUlrich Drepper <drepper@redhat.com>
Fri, 28 Aug 1998 12:05:05 +0000 (12:05 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 28 Aug 1998 12:05:05 +0000 (12:05 +0000)
elf/dl-open.c

index c093e543027b70561396b3c28c5fd7a795956e58..b343bc31a685717476265cc32a9a8fb22574133b 100644 (file)
@@ -119,7 +119,7 @@ _dl_open (const char *file, int mode)
       else
        {
          if (_dl_global_scope_alloc <
-             (size_t) (_dl_global_scope_end - _dl_global_scope + 2))
+             (size_t) (_dl_global_scope_end - _dl_global_scope + 3))
            {
              /* Must extend the list.  */
              struct link_map **new = realloc (_dl_global_scope,
@@ -160,5 +160,10 @@ _dl_open (const char *file, int mode)
        has loaded a dynamic object now has competition.  */
     __libc_multiple_libcs = 1;
 
+#ifndef MAP_COPY
+  /* We must munmap() the cache file.  */
+  _dl_unload_cache ();
+#endif
+
   return new;
 }