From 37f61117b9f43c808ca9fa19c7bdb769bb8255c1 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Thu, 10 Sep 2015 16:07:58 +0000 Subject: CRYPTO_set_mem_debug_functions() and CRYPTO_set_mem_functions() are already noops, so neuter the CRYPTO_malloc_init and CRYPTO_malloc_debug_init macros. With input from miod@ ok beck@ bcook@ miod@ --- src/lib/libcrypto/crypto.h | 21 +++------------------ src/lib/libssl/src/crypto/crypto.h | 21 +++------------------ 2 files changed, 6 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h index 68028d9c13..767c83491b 100644 --- a/src/lib/libcrypto/crypto.h +++ b/src/lib/libcrypto/crypto.h @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto.h,v 1.35 2015/06/20 12:01:54 jsing Exp $ */ +/* $OpenBSD: crypto.h,v 1.36 2015/09/10 16:07:58 jsing Exp $ */ /* ==================================================================== * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. * @@ -298,12 +298,8 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS) * via CRYPTO_ex_data_new_class). */ #define CRYPTO_EX_INDEX_USER 100 -/* This is the default callbacks, but we can have others as well: - * this is needed in Win32 where the application malloc and the - * library malloc may not be the same. - */ -#define CRYPTO_malloc_init() CRYPTO_set_mem_functions(\ - malloc, realloc, free) +#define CRYPTO_malloc_init() (0) +#define CRYPTO_malloc_debug_init() (0) #if defined CRYPTO_MDEBUG_ALL || defined CRYPTO_MDEBUG_TIME || defined CRYPTO_MDEBUG_THREAD # ifndef CRYPTO_MDEBUG /* avoid duplicate #define */ @@ -311,17 +307,6 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS) # endif #endif -/* Set standard debugging functions (not done by default - * unless CRYPTO_MDEBUG is defined) */ -#define CRYPTO_malloc_debug_init() do {\ - CRYPTO_set_mem_debug_functions(\ - CRYPTO_dbg_malloc,\ - CRYPTO_dbg_realloc,\ - CRYPTO_dbg_free,\ - CRYPTO_dbg_set_options,\ - CRYPTO_dbg_get_options);\ - } while(0) - int CRYPTO_mem_ctrl(int mode); int CRYPTO_is_mem_check_on(void); diff --git a/src/lib/libssl/src/crypto/crypto.h b/src/lib/libssl/src/crypto/crypto.h index 68028d9c13..767c83491b 100644 --- a/src/lib/libssl/src/crypto/crypto.h +++ b/src/lib/libssl/src/crypto/crypto.h @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto.h,v 1.35 2015/06/20 12:01:54 jsing Exp $ */ +/* $OpenBSD: crypto.h,v 1.36 2015/09/10 16:07:58 jsing Exp $ */ /* ==================================================================== * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. * @@ -298,12 +298,8 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS) * via CRYPTO_ex_data_new_class). */ #define CRYPTO_EX_INDEX_USER 100 -/* This is the default callbacks, but we can have others as well: - * this is needed in Win32 where the application malloc and the - * library malloc may not be the same. - */ -#define CRYPTO_malloc_init() CRYPTO_set_mem_functions(\ - malloc, realloc, free) +#define CRYPTO_malloc_init() (0) +#define CRYPTO_malloc_debug_init() (0) #if defined CRYPTO_MDEBUG_ALL || defined CRYPTO_MDEBUG_TIME || defined CRYPTO_MDEBUG_THREAD # ifndef CRYPTO_MDEBUG /* avoid duplicate #define */ @@ -311,17 +307,6 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS) # endif #endif -/* Set standard debugging functions (not done by default - * unless CRYPTO_MDEBUG is defined) */ -#define CRYPTO_malloc_debug_init() do {\ - CRYPTO_set_mem_debug_functions(\ - CRYPTO_dbg_malloc,\ - CRYPTO_dbg_realloc,\ - CRYPTO_dbg_free,\ - CRYPTO_dbg_set_options,\ - CRYPTO_dbg_get_options);\ - } while(0) - int CRYPTO_mem_ctrl(int mode); int CRYPTO_is_mem_check_on(void); -- cgit v1.2.3-55-g6feb