summaryrefslogtreecommitdiff
path: root/libexec/ld.so/library_subr.c
diff options
context:
space:
mode:
authorKurt Miller <kurt@cvs.openbsd.org>2005-11-15 02:14:48 +0000
committerKurt Miller <kurt@cvs.openbsd.org>2005-11-15 02:14:48 +0000
commiteba9db6a5ae4d34f2e388d1ab246e6b01872412f (patch)
tree152c175ce1a7e30063b535cb26c2e01f42938cf6 /libexec/ld.so/library_subr.c
parent10950d4194d779a725c68351e78e258b7899f44e (diff)
correct opencount decrement in _dl_unload_dlopen. was leaving function
with -1 as opencount and interfeering with dtors. problem reported by espie@. okay drahn@
Diffstat (limited to 'libexec/ld.so/library_subr.c')
-rw-r--r--libexec/ld.so/library_subr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/ld.so/library_subr.c b/libexec/ld.so/library_subr.c
index b8209579d34..d9b0cae8e34 100644
--- a/libexec/ld.so/library_subr.c
+++ b/libexec/ld.so/library_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: library_subr.c,v 1.23 2005/11/02 15:25:00 kurt Exp $ */
+/* $OpenBSD: library_subr.c,v 1.24 2005/11/15 02:14:47 kurt Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -431,7 +431,8 @@ _dl_unload_dlopen(void)
if (node->data == _dl_objects)
continue;
- while(node->data->opencount-- != 0) {
+ while(node->data->opencount > 0) {
+ node->data->opencount--;
_dl_notify_unload_shlib(node->data);
_dl_run_all_dtors();
}