diff options
author | Rob Percival <robpercival@google.com> | 2016-08-04 18:48:48 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-08-05 18:49:58 -0400 |
commit | 1ccbe6b32c98f61526e364c7abc94f55ec600293 (patch) | |
tree | c214bc947a51d3849c1e0bab1233949e3e9c43c5 /crypto/ct/ct_log.c | |
parent | 850864d81c49697b08254eebf565e8251f2e30db (diff) |
Removes CTLOG_new_null from the CT public API
This is an entirely useless function, given that CTLOG is publicly
immutable.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1406)
Diffstat (limited to 'crypto/ct/ct_log.c')
-rw-r--r-- | crypto/ct/ct_log.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/crypto/ct/ct_log.c b/crypto/ct/ct_log.c index 1874d9121c..13f7f39148 100644 --- a/crypto/ct/ct_log.c +++ b/crypto/ct/ct_log.c @@ -234,10 +234,12 @@ end: */ CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name) { - CTLOG *ret = CTLOG_new_null(); + CTLOG *ret = OPENSSL_zalloc(sizeof(*ret)); - if (ret == NULL) + if (ret == NULL) { + CTerr(CT_F_CTLOG_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } ret->name = OPENSSL_strdup(name); if (ret->name == NULL) { @@ -255,16 +257,6 @@ err: return NULL; } -CTLOG *CTLOG_new_null(void) -{ - CTLOG *ret = OPENSSL_zalloc(sizeof(*ret)); - - if (ret == NULL) - CTerr(CT_F_CTLOG_NEW_NULL, ERR_R_MALLOC_FAILURE); - - return ret; -} - /* Frees CT log and associated structures */ void CTLOG_free(CTLOG *log) { |