mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-08 23:49:39 +00:00
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
@ -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…
x
Reference in New Issue
Block a user