about summary refs log tree commit diff
path: root/src/ldso
diff options
context:
space:
mode:
Diffstat (limited to 'src/ldso')
-rw-r--r--src/ldso/dynlink.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index 62dd9db7..9a0697c8 100644
--- a/src/ldso/dynlink.c
+++ b/src/ldso/dynlink.c
@@ -473,6 +473,7 @@ void *__dynlink(int argc, char **argv, size_t *got)
 		*libc->prev->next = *libc;
 		libc = libc->prev->next;
 		if (libc->next) libc->next->prev = libc;
+		if (tail == &lib) tail = libc;
 	} else {
 		free_all(head);
 		free(sys_path);