diff options
author | FdaSilvaYY <fdasilvayy@gmail.com> | 2018-04-26 12:06:17 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2018-04-26 12:27:46 -0400 |
commit | f06080cb3da93e99755edb5f19e7ccc132aeba36 (patch) | |
tree | 5af1d6860ee8f6f8305a77190fa1f3bc4fcc336b /crypto/bn/bn_recp.c | |
parent | d1f7a1e62a5b67b492f8e7eb48130bf00f9a3ab0 (diff) |
Add missing error code when alloc-return-null
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6085)
Diffstat (limited to 'crypto/bn/bn_recp.c')
-rw-r--r-- | crypto/bn/bn_recp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c index 130debdf20..9ab767f42f 100644 --- a/crypto/bn/bn_recp.c +++ b/crypto/bn/bn_recp.c @@ -21,8 +21,10 @@ BN_RECP_CTX *BN_RECP_CTX_new(void) { BN_RECP_CTX *ret; - if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) + if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) { + BNerr(BN_F_BN_RECP_CTX_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } bn_init(&(ret->N)); bn_init(&(ret->Nr)); |