diff options
-rw-r--r-- | lib/libcrypto/objects/o_names.c | 16 | ||||
-rw-r--r-- | lib/libssl/ssl_ciph.c | 2 |
2 files changed, 3 insertions, 15 deletions
diff --git a/lib/libcrypto/objects/o_names.c b/lib/libcrypto/objects/o_names.c index 4f61b15441b..196d3ab0a75 100644 --- a/lib/libcrypto/objects/o_names.c +++ b/lib/libcrypto/objects/o_names.c @@ -44,9 +44,7 @@ OBJ_NAME_init(void) { if (names_lh != NULL) return (1); - MemCheck_off(); names_lh = lh_OBJ_NAME_new(); - MemCheck_on(); return (names_lh != NULL); } @@ -59,21 +57,15 @@ OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), int i; NAME_FUNCS *name_funcs; - if (name_funcs_stack == NULL) { - MemCheck_off(); + if (name_funcs_stack == NULL) name_funcs_stack = sk_NAME_FUNCS_new_null(); - MemCheck_on(); - } - if (name_funcs_stack == NULL) { - /* ERROR */ + if (name_funcs_stack == NULL) return (0); - } + ret = names_type_num; names_type_num++; for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) { - MemCheck_off(); name_funcs = malloc(sizeof(NAME_FUNCS)); - MemCheck_on(); if (!name_funcs) { OBJerr(OBJ_F_OBJ_NAME_NEW_INDEX, ERR_R_MALLOC_FAILURE); return (0); @@ -81,9 +73,7 @@ OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), name_funcs->hash_func = lh_strhash; name_funcs->cmp_func = strcmp; name_funcs->free_func = NULL; - MemCheck_off(); sk_NAME_FUNCS_push(name_funcs_stack, name_funcs); - MemCheck_on(); } name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret); if (hash_func != NULL) diff --git a/lib/libssl/ssl_ciph.c b/lib/libssl/ssl_ciph.c index bd939b7563c..22ed70b30b1 100644 --- a/lib/libssl/ssl_ciph.c +++ b/lib/libssl/ssl_ciph.c @@ -453,7 +453,6 @@ load_builtin_compressions(void) if (ssl_comp_methods == NULL) { SSL_COMP *comp = NULL; - MemCheck_off(); ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp); if (ssl_comp_methods != NULL) { comp = malloc(sizeof(SSL_COMP)); @@ -470,7 +469,6 @@ load_builtin_compressions(void) } sk_SSL_COMP_sort(ssl_comp_methods); } - MemCheck_on(); } } |