summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_lib.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_lib.c b/src/lib/libcrypto/rsa/rsa_lib.c
index b379cddc07..91f4938ec9 100644
--- a/src/lib/libcrypto/rsa/rsa_lib.c
+++ b/src/lib/libcrypto/rsa/rsa_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_lib.c,v 1.49 2023/11/19 15:46:10 tb Exp $ */ 1/* $OpenBSD: rsa_lib.c,v 1.50 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 *
@@ -192,8 +192,7 @@ LCRYPTO_ALIAS(RSA_free);
192int 192int
193RSA_up_ref(RSA *r) 193RSA_up_ref(RSA *r)
194{ 194{
195 int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_RSA); 195 return CRYPTO_add(&r->references, 1, CRYPTO_LOCK_RSA) > 1;
196 return i > 1 ? 1 : 0;
197} 196}
198LCRYPTO_ALIAS(RSA_up_ref); 197LCRYPTO_ALIAS(RSA_up_ref);
199 198