diff options
Diffstat (limited to 'src/lib/libcrypto/objects/o_names.c')
-rw-r--r-- | src/lib/libcrypto/objects/o_names.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libcrypto/objects/o_names.c b/src/lib/libcrypto/objects/o_names.c index b4453b4a98..28c9370ca3 100644 --- a/src/lib/libcrypto/objects/o_names.c +++ b/src/lib/libcrypto/objects/o_names.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | #include <string.h> | 3 | #include <string.h> |
4 | 4 | ||
5 | #include <openssl/err.h> | ||
5 | #include <openssl/lhash.h> | 6 | #include <openssl/lhash.h> |
6 | #include <openssl/objects.h> | 7 | #include <openssl/objects.h> |
7 | #include <openssl/safestack.h> | 8 | #include <openssl/safestack.h> |
@@ -80,7 +81,11 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), | |||
80 | MemCheck_off(); | 81 | MemCheck_off(); |
81 | name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS)); | 82 | name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS)); |
82 | MemCheck_on(); | 83 | MemCheck_on(); |
83 | if (!name_funcs) return(0); | 84 | if (!name_funcs) |
85 | { | ||
86 | OBJerr(OBJ_F_OBJ_NAME_NEW_INDEX,ERR_R_MALLOC_FAILURE); | ||
87 | return(0); | ||
88 | } | ||
84 | name_funcs->hash_func = lh_strhash; | 89 | name_funcs->hash_func = lh_strhash; |
85 | name_funcs->cmp_func = OPENSSL_strcmp; | 90 | name_funcs->cmp_func = OPENSSL_strcmp; |
86 | name_funcs->free_func = 0; /* NULL is often declared to | 91 | name_funcs->free_func = 0; /* NULL is often declared to |