diff options
author | Rich Salz <rsalz@akamai.com> | 2015-09-03 09:15:26 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-09-03 16:26:34 -0400 |
commit | 64b25758edca688a30f02c260262150f7ad0bc7d (patch) | |
tree | 15ad5a8c7985e2b27aaf7a14737fd980a36349dd /crypto/hmac | |
parent | fb4844bbc62fb014c115cd8fd2fc4304cba6eb89 (diff) | |
download | openssl-64b25758edca688a30f02c260262150f7ad0bc7d.tar.gz |
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/hmac')
-rw-r--r-- | crypto/hmac/hm_pmeth.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crypto/hmac/hm_pmeth.c b/crypto/hmac/hm_pmeth.c index fcccb58d23..ff9dbe35b0 100644 --- a/crypto/hmac/hm_pmeth.c +++ b/crypto/hmac/hm_pmeth.c @@ -75,13 +75,10 @@ typedef struct { static int pkey_hmac_init(EVP_PKEY_CTX *ctx) { HMAC_PKEY_CTX *hctx; - hctx = OPENSSL_malloc(sizeof(*hctx)); + + hctx = OPENSSL_zalloc(sizeof(*hctx)); if (!hctx) return 0; - hctx->md = NULL; - hctx->ktmp.data = NULL; - hctx->ktmp.length = 0; - hctx->ktmp.flags = 0; hctx->ktmp.type = V_ASN1_OCTET_STRING; HMAC_CTX_init(&hctx->ctx); |