diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index fd46c2964b19..72ecab1f1eb5 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: rtld.c,v 1.23 1999/04/22 01:54:38 jdp Exp $ + * $Id: rtld.c,v 1.24 1999/06/25 02:53:48 jdp Exp $ */ /* @@ -1159,9 +1159,10 @@ dlopen(const char *name, int mode) GDB_STATE(RT_ADD); - if (name == NULL) + if (name == NULL) { obj = obj_main; - else { + obj->refcount++; + } else { char *path = find_library(name, obj_main); if (path != NULL) obj = load_object(path);