diff options
Diffstat (limited to 'elf/dl-close.c')
-rw-r--r-- | elf/dl-close.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c index 184d382..0a16d69 100644 --- a/elf/dl-close.c +++ b/elf/dl-close.c @@ -99,7 +99,8 @@ _dl_close (struct link_map *map) } /* Finally, unlink the data structure and free it. */ - map->l_prev->l_next = map->l_next; + if (map->l_prev) + map->l_prev->l_next = map->l_next; if (map->l_next) map->l_next->l_prev = map->l_prev; if (map->l_searchlist) |