mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
krb5kdf: Do not dereference NULL ctx when allocation fails
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13953)
This commit is contained in:
parent
b897b353df
commit
5764c3522c
@ -63,8 +63,10 @@ static void *krb5kdf_new(void *provctx)
|
||||
if (!ossl_prov_is_running())
|
||||
return NULL;
|
||||
|
||||
if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL)
|
||||
if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL) {
|
||||
ERR_raise(ERR_LIB_PROV, ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
ctx->provctx = provctx;
|
||||
return ctx;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user