projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b897b35
)
krb5kdf: Do not dereference NULL ctx when allocation fails
author
Tomas Mraz
<tmraz@fedoraproject.org>
Wed, 13 Nov 2019 10:04:08 +0000
(11:04 +0100)
committer
Tomas Mraz
<tomas@openssl.org>
Tue, 26 Jan 2021 14:11:11 +0000
(15:11 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13953)
providers/implementations/kdfs/krb5kdf.c
patch
|
blob
|
history
diff --git
a/providers/implementations/kdfs/krb5kdf.c
b/providers/implementations/kdfs/krb5kdf.c
index cdf8a154157be6dd93a2475f6e1c4e9954cc1f97..c719dbf25977e756e1f8d0d2f58d0d863b20baba 100644
(file)
--- a/
providers/implementations/kdfs/krb5kdf.c
+++ b/
providers/implementations/kdfs/krb5kdf.c
@@
-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;
}