diff options
author | Kurt Miller <kurt@cvs.openbsd.org> | 2005-10-09 04:37:14 +0000 |
---|---|---|
committer | Kurt Miller <kurt@cvs.openbsd.org> | 2005-10-09 04:37:14 +0000 |
commit | db3316a3a24b2daecd14456774e4f3268e91f065 (patch) | |
tree | 06e081971c20ee7f0f42ec2b85c0bf74a415d5d8 | |
parent | a221e01b5326b6ac9e1b1b8ef17b8b189b37a794 (diff) |
fix incomplete ref count check in _dl_link_dlopen (use macro now).
-rw-r--r-- | libexec/ld.so/library_subr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/ld.so/library_subr.c b/libexec/ld.so/library_subr.c index 4d553d67b65..220222ac3ca 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.19 2005/10/09 04:29:13 kurt Exp $ */ +/* $OpenBSD: library_subr.c,v 1.20 2005/10/09 04:37:13 kurt Exp $ */ /* * Copyright (c) 2002 Dale Rahn @@ -338,7 +338,9 @@ _dl_link_dlopen(elf_object_t *dep) { struct dep_node *n; - if (dep->opencount++ > 0) + dep->opencount++; + + if (OBJECT_DLREF_CNT(dep) > 1) return; n = _dl_malloc(sizeof *n); |