fix stale pointer issue in dynamic linker with dlopen

This commit is contained in:
Rich Felker 2011-06-26 22:39:34 -04:00
parent 06933cc724
commit 9e17b71fa6
1 changed files with 1 additions and 0 deletions

View File

@ -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);