From c5e4bc8373b44b3c0ed84cbb48e0d52d472bcdba Mon Sep 17 00:00:00 2001 From: tb Date: Mon, 25 Dec 2023 21:36:05 +0000 Subject: [PATCH] Fix EVP_PKEY_up_ref() - must have hit ^X somehow --- lib/libcrypto/evp/p_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/evp/p_lib.c b/lib/libcrypto/evp/p_lib.c index b4f64906406..6cecad20d46 100644 --- a/lib/libcrypto/evp/p_lib.c +++ b/lib/libcrypto/evp/p_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p_lib.c,v 1.44 2023/12/25 21:33:50 tb Exp $ */ +/* $OpenBSD: p_lib.c,v 1.45 2023/12/25 21:36:05 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -211,7 +211,7 @@ EVP_PKEY_new(void) int EVP_PKEY_up_ref(EVP_PKEY *pkey) { - return CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY) > 0; + return CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY) > 1; } static void -- 2.20.1