summaryrefslogtreecommitdiff
path: root/libexec/ld.so/dlfcn.c
diff options
context:
space:
mode:
authorKurt Miller <kurt@cvs.openbsd.org>2005-10-05 21:50:54 +0000
committerKurt Miller <kurt@cvs.openbsd.org>2005-10-05 21:50:54 +0000
commitdeccd2b073d8ae6835f9d687f68d0a4256c4e531 (patch)
tree0cfe7447657f9971a92ac2ad0283cb20322671a8 /libexec/ld.so/dlfcn.c
parente988140e95993e5208b9c6140d045509de8c7a22 (diff)
move opencount increment and dups check to _dl_link_dlopen. fixes cleanup
of partially dlopened (but failed) cleanup.
Diffstat (limited to 'libexec/ld.so/dlfcn.c')
-rw-r--r--libexec/ld.so/dlfcn.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libexec/ld.so/dlfcn.c b/libexec/ld.so/dlfcn.c
index 95481cb20bb..3027141f6f6 100644
--- a/libexec/ld.so/dlfcn.c
+++ b/libexec/ld.so/dlfcn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dlfcn.c,v 1.61 2005/10/03 21:01:37 kurt Exp $ */
+/* $OpenBSD: dlfcn.c,v 1.62 2005/10/05 21:50:53 kurt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -69,8 +69,7 @@ dlopen(const char *libname, int flags)
_dl_loading_object = object;
- if (object->opencount == 0)
- _dl_link_dlopen(object);
+ _dl_link_dlopen(object);
if (++object->refcount > 1)
goto loaded;
@@ -147,9 +146,6 @@ dlopen(const char *libname, int flags)
}
loaded:
- if (failed == 0)
- object->opencount++;
-
_dl_loading_object = NULL;
if (_dl_debug_map->r_brk) {