summaryrefslogtreecommitdiffstats
path: root/crypto/params.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/params.c')
-rw-r--r--crypto/params.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/params.c b/crypto/params.c
index 7a329a8467..4c5a6f5334 100644
--- a/crypto/params.c
+++ b/crypto/params.c
@@ -1038,7 +1038,7 @@ int OSSL_PARAM_get_BN(const OSSL_PARAM *p, BIGNUM **val)
}
if (b == NULL) {
- ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_CRYPTO, ERR_R_BN_LIB);
return 0;
}
@@ -1284,10 +1284,8 @@ static int get_string_internal(const OSSL_PARAM *p, void **val,
if (*val == NULL) {
char *const q = OPENSSL_malloc(alloc_sz);
- if (q == NULL) {
- ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE);
+ if (q == NULL)
return 0;
- }
*val = q;
*max_len = alloc_sz;
}