From: tb Date: Sat, 13 Jan 2024 11:57:51 +0000 (+0000) Subject: Remove obj_cleanup_defer X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=75591f2f19955c868111d857b1e359368603bb0e;p=openbsd Remove obj_cleanup_defer With check_defer() gone, this is never set to anything but 0, so the two conditional branches it is still involved in are dead code. --- diff --git a/lib/libcrypto/evp/names.c b/lib/libcrypto/evp/names.c index 7dc9457c3e4..a0b19917e19 100644 --- a/lib/libcrypto/evp/names.c +++ b/lib/libcrypto/evp/names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: names.c,v 1.28 2024/01/13 11:55:31 tb Exp $ */ +/* $OpenBSD: names.c,v 1.29 2024/01/13 11:57:51 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -64,8 +64,6 @@ #include "evp_local.h" -extern int obj_cleanup_defer; - int EVP_add_cipher(const EVP_CIPHER *c) { @@ -81,8 +79,4 @@ EVP_add_digest(const EVP_MD *md) void EVP_cleanup(void) { - if (obj_cleanup_defer == 2) { - obj_cleanup_defer = 0; - OBJ_cleanup(); - } } diff --git a/lib/libcrypto/objects/obj_dat.c b/lib/libcrypto/objects/obj_dat.c index be80420702d..acc4556d5be 100644 --- a/lib/libcrypto/objects/obj_dat.c +++ b/lib/libcrypto/objects/obj_dat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: obj_dat.c,v 1.83 2024/01/13 11:55:31 tb Exp $ */ +/* $OpenBSD: obj_dat.c,v 1.84 2024/01/13 11:57:51 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -183,20 +183,9 @@ static IMPLEMENT_LHASH_DOALL_FN(cleanup1, ADDED_OBJ) static IMPLEMENT_LHASH_DOALL_FN(cleanup2, ADDED_OBJ) static IMPLEMENT_LHASH_DOALL_FN(cleanup3, ADDED_OBJ) -/* The purpose of obj_cleanup_defer is to avoid EVP_cleanup() attempting - * to use freed up OIDs. If necessary the actual freeing up of OIDs is - * delayed. - */ - -int obj_cleanup_defer = 0; - void OBJ_cleanup(void) { - if (obj_cleanup_defer) { - obj_cleanup_defer = 2; - return; - } if (added == NULL) return; lh_ADDED_OBJ_down_load(added) = 0;