aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-close.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-24 07:10:08 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-24 07:10:08 +0000
commit69f0c4d8b99dd0aaf82fa213a518ebe1f813791e (patch)
tree63877d022f5ff409ae86e3590a551d1d075a09e9 /elf/dl-close.c
parentb6a0a99693379a0ceb9146bf3c38eb313b977e4c (diff)
downloadglibc-69f0c4d8b99dd0aaf82fa213a518ebe1f813791e.tar
glibc-69f0c4d8b99dd0aaf82fa213a518ebe1f813791e.tar.gz
glibc-69f0c4d8b99dd0aaf82fa213a518ebe1f813791e.tar.bz2
glibc-69f0c4d8b99dd0aaf82fa213a518ebe1f813791e.zip
Update.
* elf/dl-close.c (free_slotinfo): Check for end of list and return true in this case.
Diffstat (limited to 'elf/dl-close.c')
-rw-r--r--elf/dl-close.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 65992d5c80..9d81ad3db8 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -386,7 +386,11 @@ free_slotinfo (struct dtv_slotinfo_list *elemp)
{
size_t cnt;
- if (elemp->next != NULL && !free_slotinfo (elemp->next))
+ if (elemp == NULL)
+ /* Nothing here, all is removed (or there never was anything). */
+ return true;
+
+ if (!free_slotinfo (elemp->next))
/* We cannot free the entry. */
return false;