diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2005-09-28 21:56:25 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2005-09-28 21:56:25 +0000 |
commit | a2c5de50789c2379a62d1f188c8f3d2505e7ea3e (patch) | |
tree | ec3e995be592482e5114660b18d1e26f8de8e997 /libexec/ld.so | |
parent | 5dff8ac7c7c6a4f716d8746b411210c0563871c8 (diff) |
correct last commit, in both files.
Diffstat (limited to 'libexec/ld.so')
-rw-r--r-- | libexec/ld.so/library.c | 6 | ||||
-rw-r--r-- | libexec/ld.so/library_mquery.c | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/libexec/ld.so/library.c b/libexec/ld.so/library.c index a08d5d3f410..88ee59b3353 100644 --- a/libexec/ld.so/library.c +++ b/libexec/ld.so/library.c @@ -1,4 +1,4 @@ -/* $OpenBSD: library.c,v 1.44 2005/09/28 20:35:23 drahn Exp $ */ +/* $OpenBSD: library.c,v 1.45 2005/09/28 21:56:24 drahn Exp $ */ /* * Copyright (c) 2002 Dale Rahn @@ -59,8 +59,8 @@ _dl_unload_shlib(elf_object_t *object) { struct dep_node *n; DL_DEB(("unload_shlib called on %s\n", object->load_name)); - if (object->refcount == 0 && (object->status & STATUS_UNLOADED) == 0) { - object->status |= STATUS_UNLOADED; + if (object->refcount == 0 && (object->status & STAT_UNLOADED) == 0) { + object->status |= STAT_UNLOADED; TAILQ_FOREACH(n, &object->child_list, next_sib) _dl_unload_shlib(n->data); DL_DEB(("unload_shlib unloading on %s\n", object->load_name)); diff --git a/libexec/ld.so/library_mquery.c b/libexec/ld.so/library_mquery.c index 4aeb82096e3..49d6944ab93 100644 --- a/libexec/ld.so/library_mquery.c +++ b/libexec/ld.so/library_mquery.c @@ -1,4 +1,4 @@ -/* $OpenBSD: library_mquery.c,v 1.25 2005/09/27 14:47:00 kurt Exp $ */ +/* $OpenBSD: library_mquery.c,v 1.26 2005/09/28 21:56:24 drahn Exp $ */ /* * Copyright (c) 2002 Dale Rahn @@ -64,7 +64,8 @@ _dl_unload_shlib(elf_object_t *object) { struct dep_node *n; DL_DEB(("unload_shlib called on %s\n", object->load_name)); - if (object->refcount == 0) { + if (object->refcount == 0 && (object->status & STAT_UNLOADED) == 0) { + object->status |= STAT_UNLOADED; TAILQ_FOREACH(n, &object->child_list, next_sib) _dl_unload_shlib(n->data); DL_DEB(("unload_shlib unloading on %s\n", object->load_name)); |