summaryrefslogtreecommitdiffstats
path: root/crypto/encode_decode/encoder_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/encode_decode/encoder_lib.c')
-rw-r--r--crypto/encode_decode/encoder_lib.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/encode_decode/encoder_lib.c b/crypto/encode_decode/encoder_lib.c
index 7868da79b7..28dae99dc8 100644
--- a/crypto/encode_decode/encoder_lib.c
+++ b/crypto/encode_decode/encoder_lib.c
@@ -193,10 +193,8 @@ static OSSL_ENCODER_INSTANCE *ossl_encoder_instance_new(OSSL_ENCODER *encoder,
return 0;
}
- if ((encoder_inst = OPENSSL_zalloc(sizeof(*encoder_inst))) == NULL) {
- ERR_raise(ERR_LIB_OSSL_ENCODER, ERR_R_MALLOC_FAILURE);
+ if ((encoder_inst = OPENSSL_zalloc(sizeof(*encoder_inst))) == NULL)
return 0;
- }
if (!OSSL_ENCODER_up_ref(encoder)) {
ERR_raise(ERR_LIB_OSSL_ENCODER, ERR_R_INTERNAL_ERROR);
@@ -259,7 +257,7 @@ static int ossl_encoder_ctx_add_encoder_inst(OSSL_ENCODER_CTX *ctx,
if (ctx->encoder_insts == NULL
&& (ctx->encoder_insts =
sk_OSSL_ENCODER_INSTANCE_new_null()) == NULL) {
- ERR_raise(ERR_LIB_OSSL_ENCODER, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_OSSL_ENCODER, ERR_R_CRYPTO_LIB);
return 0;
}