diff options
Diffstat (limited to 'crypto/kdf/hkdf.c')
-rw-r--r-- | crypto/kdf/hkdf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/kdf/hkdf.c b/crypto/kdf/hkdf.c index 63c3523c27..16514a8430 100644 --- a/crypto/kdf/hkdf.c +++ b/crypto/kdf/hkdf.c @@ -48,9 +48,10 @@ static int pkey_hkdf_init(EVP_PKEY_CTX *ctx) { HKDF_PKEY_CTX *kctx; - kctx = OPENSSL_zalloc(sizeof(*kctx)); - if (kctx == NULL) + if ((kctx = OPENSSL_zalloc(sizeof(*kctx))) == NULL) { + KDFerr(KDF_F_PKEY_HKDF_INIT, ERR_R_MALLOC_FAILURE); return 0; + } ctx->data = kctx; |