summaryrefslogtreecommitdiffstats
path: root/crypto/dso/dso_lib.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2016-01-30 18:04:25 +0100
committerRich Salz <rsalz@openssl.org>2016-02-11 18:40:32 +0100
commitf3f1cf8444f439c0be9de04bf3821a20d00fd956 (patch)
tree50d0fc624d4680e6cd734328126cd60a9dc128be /crypto/dso/dso_lib.c
parentRT3495: Add a hash for faster dup detection. (diff)
downloadopenssl-f3f1cf8444f439c0be9de04bf3821a20d00fd956.tar.xz
openssl-f3f1cf8444f439c0be9de04bf3821a20d00fd956.zip
Move to REF_DEBUG, for consistency.
Add utility macros REF_ASSERT_NOT and REF_PRINT_COUNT This is also RT 4181 Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/dso/dso_lib.c')
-rw-r--r--crypto/dso/dso_lib.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/crypto/dso/dso_lib.c b/crypto/dso/dso_lib.c
index bc3a785940..0921fb2409 100644
--- a/crypto/dso/dso_lib.c
+++ b/crypto/dso/dso_lib.c
@@ -136,17 +136,10 @@ int DSO_free(DSO *dso)
return (1);
i = CRYPTO_add(&dso->references, -1, CRYPTO_LOCK_DSO);
-#ifdef REF_PRINT
- REF_PRINT("DSO", dso);
-#endif
+ REF_PRINT_COUNT("DSO", dso);
if (i > 0)
return (1);
-#ifdef REF_CHECK
- if (i < 0) {
- fprintf(stderr, "DSO_free, bad reference count\n");
- abort();
- }
-#endif
+ REF_ASSERT_ISNT(i < 0);
if ((dso->meth->dso_unload != NULL) && !dso->meth->dso_unload(dso)) {
DSOerr(DSO_F_DSO_FREE, DSO_R_UNLOAD_FAILED);