summary refs log tree commit diff
path: root/elf/dl-close.c
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2012-08-17 11:44:37 +0100
committerGary Benson <gbenson@redhat.com>2012-08-17 11:44:37 +0100
commitd9195db871b11e139050dfa00e333ca8b2f7a677 (patch)
treea312aa6a453a0745cab0be1c7c6479959eca05d3 /elf/dl-close.c
parent86466cd930d045a44cb7e85398660d9842e463c6 (diff)
downloadglibc-d9195db871b11e139050dfa00e333ca8b2f7a677.tar.gz
glibc-d9195db871b11e139050dfa00e333ca8b2f7a677.tar.xz
glibc-d9195db871b11e139050dfa00e333ca8b2f7a677.zip
Also set r->r_map when unmapping the first object in a namespace.
When unmapping the first object in a namespace, the runtime linker
did not update the externally visible pointer.  This resulted in
debuggers seeing pointers to memory that had been freed.
Diffstat (limited to 'elf/dl-close.c')
-rw-r--r--elf/dl-close.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 45b218787b..216bd81b62 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -641,7 +641,7 @@ _dl_close_worker (struct link_map *map)
 #ifdef SHARED
 	      assert (nsid != LM_ID_BASE);
 #endif
-	      ns->_ns_loaded = imap->l_next;
+	      r->r_map = ns->_ns_loaded = imap->l_next;
 	    }
 
 	  --ns->_ns_nloaded;