]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_dl_close): Fix byte count while removing the shared object from the
authorUlrich Drepper <drepper@redhat.com>
Mon, 23 Mar 1998 11:50:23 +0000 (11:50 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 23 Mar 1998 11:50:23 +0000 (11:50 +0000)
global scope list and optimize a little bit.

elf/dl-close.c

index ca02eaae4e591f5bd1de3380458b75d7b3e24c38..e49054acee4f19d3ea708e8b4f9ef04b590b9432 100644 (file)
@@ -83,10 +83,9 @@ _dl_close (struct link_map *map)
              do
                --tail;
              while (*tail != imap);
+             memcpy (tail, tail + 1,
+                     (char *) _dl_global_scope_end - (char *) tail);
              --_dl_global_scope_end;
-             memcpy (tail, tail + 1, _dl_global_scope_end - tail);
-             _dl_global_scope_end[0] = NULL;
-             _dl_global_scope_end[1] = NULL;
            }
 
          /* We can unmap all the maps at once.  We just have to determine