More zalloc nits

Found on GitHub by dimman

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Rich Salz 2015-09-04 08:13:19 -04:00 committed by Rich Salz
parent 47bbaa5b60
commit a939b0aab5
2 changed files with 1 additions and 2 deletions

View file

@ -180,7 +180,6 @@ static EVP_PKEY_CTX *int_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id)
ret->pkey = pkey;
if (pkey)
CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY);
ret->data = NULL;
if (pmeth->init) {
if (pmeth->init(ret) <= 0) {

View file

@ -153,7 +153,7 @@ _STACK *sk_new(int (*c) (const void *, const void *))
if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
goto err;
if ((ret->data = OPENSSL_malloc(sizeof(*ret->data) * MIN_NODES)) == NULL)
if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)
goto err;
ret->comp = c;
ret->num_alloc = MIN_NODES;