summaryrefslogtreecommitdiff
path: root/nss/nsswitch.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-06-15 20:10:24 +0000
committerRoland McGrath <roland@gnu.org>2004-06-15 20:10:24 +0000
commit0ab7f77ef5ed29d2a22a2611fce3382eb1379768 (patch)
tree2168061065c0c1986a8c92bf92bb6a37d38c02cd /nss/nsswitch.c
parent6d00189e10342ffa12aba5f4774f1dba7207ea04 (diff)
downloadglibc-0ab7f77ef5ed29d2a22a2611fce3382eb1379768.tar.gz
[BZ #217, BZ #219]
2004-06-14 Jakub Jelinek <jakub@redhat.com> [BZ #219] * nss/nsswitch.c (free_mem): Don't try to close a library handle if the handle is invalid. Patch by David Kimdon <kimdon@esrf.fr>. 2004-06-11 Dmitry V. Levin <ldv@altlinux.org> [BZ #217] * debug/xtrace.sh: Fix typo in error diagnostics.
Diffstat (limited to 'nss/nsswitch.c')
-rw-r--r--nss/nsswitch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index b983e3443b..895b17825a 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996-1999,2001,2002,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -749,7 +750,8 @@ libc_freeres_fn (free_mem)
{
service_library *oldl = library;
- __libc_dlclose (library->lib_handle);
+ if (library->lib_handle && library->lib_handle != (void *) -1l)
+ __libc_dlclose (library->lib_handle);
library = library->next;
free (oldl);