aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-11-09 20:16:10 +0000
committerUlrich Drepper <drepper@redhat.com>2001-11-09 20:16:10 +0000
commit8bbd5f84898e4c9030bd8abad5375d0fef3309f7 (patch)
treedae36c076cb0bc95347879720ae5f068df243057
parent50e79604ab83749147fad66fc61fe9c532e6ac38 (diff)
downloadglibc-8bbd5f84898e4c9030bd8abad5375d0fef3309f7.tar
glibc-8bbd5f84898e4c9030bd8abad5375d0fef3309f7.tar.gz
glibc-8bbd5f84898e4c9030bd8abad5375d0fef3309f7.tar.bz2
glibc-8bbd5f84898e4c9030bd8abad5375d0fef3309f7.zip
(lose): Remove some unnecessary code. The new object is always the last in the list.
-rw-r--r--elf/dl-load.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 337517b19a..a17f25a4f1 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -755,10 +755,14 @@ lose (int code, int fd, const char *name, char *realname, struct link_map *l,
if (l != NULL)
{
/* Remove the stillborn object from the list and free it. */
- if (l->l_prev)
- l->l_prev->l_next = l->l_next;
- if (l->l_next)
- l->l_next->l_prev = l->l_prev;
+ assert (l->l_next == NULL);
+#ifndef SHARED
+ if (l->l_prev == NULL)
+ /* No other module loaded. */
+ _dl_loaded = NULL;
+ else
+#endif
+ l->l_prev->l_next = NULL;
--_dl_nloaded;
free (l);
}