From: Ulrich Drepper Date: Fri, 28 Aug 1998 12:05:05 +0000 (+0000) Subject: (_dl_open): Correct test for extending global scope array. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83a048424ab50fda3853f3d71dc884879858cbf4;p=thirdparty%2Fglibc.git (_dl_open): Correct test for extending global scope array. --- diff --git a/elf/dl-open.c b/elf/dl-open.c index c093e543027..b343bc31a68 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -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; }