aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-close.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-close.c')
-rw-r--r--elf/dl-close.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 700e765c3c..5b54e9f2f6 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -1,5 +1,5 @@
/* Close a shared object opened by `_dl_open'.
- Copyright (C) 1996-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -274,7 +274,7 @@ _dl_close_worker (struct link_map *map)
}
#ifdef SHARED
- /* Auditing checkpoint: we have a new object. */
+ /* Auditing checkpoint: we remove an object. */
if (__builtin_expect (do_audit, 0))
{
struct audit_ifaces *afct = GLRO(dl_audit);
@@ -421,6 +421,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. */