summaryrefslogtreecommitdiff
path: root/libexec/ld.so/library.c
diff options
context:
space:
mode:
authorKurt Miller <kurt@cvs.openbsd.org>2005-09-27 14:47:01 +0000
committerKurt Miller <kurt@cvs.openbsd.org>2005-09-27 14:47:01 +0000
commit0626736c105a008c1da3d4379443cdb4d0e27054 (patch)
tree56c1b574a4819ec02ca8b7009f367730e70d18ae /libexec/ld.so/library.c
parentf0844c9a62919fb8eded8e838d42d92594825def (diff)
increment refcount when opening a lib that is already open (dev/inode
case) ok drahn@
Diffstat (limited to 'libexec/ld.so/library.c')
-rw-r--r--libexec/ld.so/library.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/ld.so/library.c b/libexec/ld.so/library.c
index 38e2390a5e3..a708784c66d 100644
--- a/libexec/ld.so/library.c
+++ b/libexec/ld.so/library.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: library.c,v 1.42 2005/09/26 14:51:05 drahn Exp $ */
+/* $OpenBSD: library.c,v 1.43 2005/09/27 14:47:00 kurt Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -108,6 +108,7 @@ _dl_tryload_shlib(const char *libname, int type, int flags)
for (object = _dl_objects; object != NULL; object = object->next) {
if (object->dev == sb.st_dev &&
object->inode == sb.st_ino) {
+ object->refcount++;
object->load_object->obj_flags |= flags & RTLD_GLOBAL;
_dl_close(libfile);
return(object);