summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa/dsa_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_lib.c')
-rw-r--r--src/lib/libcrypto/dsa/dsa_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c
index 65eb65288d..2727e220f9 100644
--- a/src/lib/libcrypto/dsa/dsa_lib.c
+++ b/src/lib/libcrypto/dsa/dsa_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_lib.c,v 1.46 2023/11/29 21:35:57 tb Exp $ */ 1/* $OpenBSD: dsa_lib.c,v 1.47 2024/03/27 01:22:30 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -176,8 +176,7 @@ LCRYPTO_ALIAS(DSA_free);
176int 176int
177DSA_up_ref(DSA *r) 177DSA_up_ref(DSA *r)
178{ 178{
179 int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_DSA); 179 return CRYPTO_add(&r->references, 1, CRYPTO_LOCK_DSA) > 1;
180 return i > 1 ? 1 : 0;
181} 180}
182LCRYPTO_ALIAS(DSA_up_ref); 181LCRYPTO_ALIAS(DSA_up_ref);
183 182