summaryrefslogtreecommitdiffstats
path: root/crypto/objects/o_names.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-09-03 15:15:26 +0200
committerRich Salz <rsalz@openssl.org>2015-09-03 22:26:34 +0200
commit64b25758edca688a30f02c260262150f7ad0bc7d (patch)
tree15ad5a8c7985e2b27aaf7a14737fd980a36349dd /crypto/objects/o_names.c
parentAdd UEFI flag for rand build (diff)
downloadopenssl-64b25758edca688a30f02c260262150f7ad0bc7d.tar.xz
openssl-64b25758edca688a30f02c260262150f7ad0bc7d.zip
remove 0 assignments.
After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/objects/o_names.c')
-rw-r--r--crypto/objects/o_names.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c
index d861b6d083..7a24ad01f2 100644
--- a/crypto/objects/o_names.c
+++ b/crypto/objects/o_names.c
@@ -83,7 +83,7 @@ int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
names_type_num++;
for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {
MemCheck_off();
- name_funcs = OPENSSL_malloc(sizeof(*name_funcs));
+ name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));
MemCheck_on();
if (!name_funcs) {
OBJerr(OBJ_F_OBJ_NAME_NEW_INDEX, ERR_R_MALLOC_FAILURE);
@@ -91,10 +91,6 @@ int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
}
name_funcs->hash_func = lh_strhash;
name_funcs->cmp_func = OPENSSL_strcmp;
- name_funcs->free_func = 0; /* NULL is often declared to * ((void
- * *)0), which according * to Compaq C is
- * not really * compatible with a function
- * * pointer. -- Richard Levitte */
MemCheck_off();
sk_NAME_FUNCS_push(name_funcs_stack, name_funcs);
MemCheck_on();