aboutsummaryrefslogtreecommitdiff
path: root/iconv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-04 21:26:12 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-04 21:26:12 +0000
commitadd40772bf9dc663fb4fefc024ba6d7da72fa55c (patch)
tree9067c53f2b5f9804f8aa9d8cd32b79457c9929ab /iconv
parent1dd548500f4b9f8526faebedd19c697a8dba57d9 (diff)
downloadglibc-add40772bf9dc663fb4fefc024ba6d7da72fa55c.zip
glibc-add40772bf9dc663fb4fefc024ba6d7da72fa55c.tar.gz
glibc-add40772bf9dc663fb4fefc024ba6d7da72fa55c.tar.bz2
Update.
2000-06-04 Ulrich Drepper <drepper@redhat.com> * iconv/gconv_dl.c (do_release_shlib): Don't reset reference counter for the object we are releasing, just decrement it. Patch by Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>.
Diffstat (limited to 'iconv')
-rw-r--r--iconv/gconv_dl.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/iconv/gconv_dl.c b/iconv/gconv_dl.c
index d4738b5..710b440 100644
--- a/iconv/gconv_dl.c
+++ b/iconv/gconv_dl.c
@@ -1,5 +1,5 @@
/* Handle loading/unloading of shared object for transformation.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,6 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <assert.h>
#include <dlfcn.h>
#include <inttypes.h>
#include <search.h>
@@ -154,9 +155,12 @@ do_release_shlib (const void *nodep, VISIT value, int level)
return;
if (obj == release_handle)
- /* This is the object we want to unload. Now set the release
- counter to zero. */
- obj->counter = 0;
+ {
+ /* This is the object we want to unload. Now decrement the
+ reference counter. */
+ assert (obj->counter > 0);
+ --obj->counter;
+ }
else if (obj->counter <= 0)
{
if (--obj->counter < -TRIES_BEFORE_UNLOAD && obj->handle != NULL)