summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/evp/p_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/evp/p_lib.c b/src/lib/libcrypto/evp/p_lib.c
index dce4dbd5a6..2b409220bb 100644
--- a/src/lib/libcrypto/evp/p_lib.c
+++ b/src/lib/libcrypto/evp/p_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_lib.c,v 1.40 2023/12/25 21:25:24 tb Exp $ */ 1/* $OpenBSD: p_lib.c,v 1.41 2023/12/25 21:27:03 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 *
@@ -213,8 +213,7 @@ EVP_PKEY_new(void)
213int 213int
214EVP_PKEY_up_ref(EVP_PKEY *pkey) 214EVP_PKEY_up_ref(EVP_PKEY *pkey)
215{ 215{
216 int refs = CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY); 216 return CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY) > 0;
217 return ((refs > 1) ? 1 : 0);
218} 217}
219 218
220/* Setup a public key ASN1 method from a NID or a string. 219/* Setup a public key ASN1 method from a NID or a string.