Check for NULL return from zalloc in dh_dupctx.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/9485)
This commit is contained in:
parent
c361297046
commit
02c163ea89
1 changed files with 2 additions and 0 deletions
|
@ -106,6 +106,8 @@ static void *dh_dupctx(void *vpdhctx)
|
|||
PROV_DH_CTX *dstctx;
|
||||
|
||||
dstctx = OPENSSL_zalloc(sizeof(*srcctx));
|
||||
if (dstctx == NULL)
|
||||
return NULL;
|
||||
|
||||
*dstctx = *srcctx;
|
||||
if (dstctx->dh != NULL && !DH_up_ref(dstctx->dh)) {
|
||||
|
|
Loading…
Reference in a new issue