diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-08-28 20:45:42 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-08-28 20:45:42 +0000 |
commit | cdc9b26808c0b0a84c7d9b9b12a1410a6693f2e3 (patch) | |
tree | 39f1942dca98546101968e0345f1b8f3cf86f20c /gnu/usr.bin/ld | |
parent | e752efeb4069c8a39f32fa7542b13029f585fe08 (diff) |
set RTLD_DL flag before refcount++ returns; michaels@inet.no
Diffstat (limited to 'gnu/usr.bin/ld')
-rw-r--r-- | gnu/usr.bin/ld/rtld/rtld.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c index c29ad5ab41e..a719bdaf216 100644 --- a/gnu/usr.bin/ld/rtld/rtld.c +++ b/gnu/usr.bin/ld/rtld/rtld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld.c,v 1.9 1998/03/26 19:47:29 niklas Exp $ */ +/* $OpenBSD: rtld.c,v 1.10 1998/08/28 20:45:41 deraadt Exp $ */ /* $NetBSD: rtld.c,v 1.43 1996/01/14 00:35:17 pk Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -1512,14 +1512,14 @@ xprintf("%s: %s\n", name, strerror(errno)); return NULL; } + LM_PRIVATE(smp)->spd_flags |= RTLD_DL; + if (LM_PRIVATE(smp)->spd_refcount++ > 0) { free((char *)sodp->sod_name); free(sodp); return smp; } - LM_PRIVATE(smp)->spd_flags |= RTLD_DL; - if (load_subs(smp) != 0) { if (--LM_PRIVATE(smp)->spd_refcount == 0) { unmap_object(smp); |