about summary refs log tree commit diff
path: root/elf/dl-close.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2011-08-24 09:32:13 +0200
committerAndreas Schwab <schwab@redhat.com>2011-08-24 09:32:13 +0200
commit39dd69dfb9b8948720f05455df6775b70238803f (patch)
treeef705bd72d5de79844f371004cb96f372212bc6e /elf/dl-close.c
parent22044b48baa8a3c3fe67ab912e9f34a80c97880b (diff)
downloadglibc-39dd69dfb9b8948720f05455df6775b70238803f.tar.gz
glibc-39dd69dfb9b8948720f05455df6775b70238803f.tar.xz
glibc-39dd69dfb9b8948720f05455df6775b70238803f.zip
Fix scope handling during dl_close
Diffstat (limited to 'elf/dl-close.c')
-rw-r--r--elf/dl-close.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 4cf98c3b99..8fb55d0fbc 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -430,6 +430,13 @@ _dl_close_worker (struct link_map *map)
 
 	      imap->l_scope_max = new_size;
 	    }
+	  else if (new_list != NULL)
+	    {
+	      /* We didn't change the scope array, so reset the search
+		 list.  */
+	      imap->l_searchlist.r_list = NULL;
+	      imap->l_searchlist.r_nlist = 0;
+	    }
 
 	  /* The loader is gone, so mark the object as not having one.
 	     Note: l_idx != IDX_STILL_USED -> object will be removed.  */