aboutsummaryrefslogtreecommitdiff
path: root/providers/implementations/encode_decode/decode_msblob2key.c
diff options
context:
space:
mode:
Diffstat (limited to 'providers/implementations/encode_decode/decode_msblob2key.c')
-rw-r--r--providers/implementations/encode_decode/decode_msblob2key.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/providers/implementations/encode_decode/decode_msblob2key.c b/providers/implementations/encode_decode/decode_msblob2key.c
index b9d0cabadae2..df327210f114 100644
--- a/providers/implementations/encode_decode/decode_msblob2key.c
+++ b/providers/implementations/encode_decode/decode_msblob2key.c
@@ -132,10 +132,8 @@ static int msblob2key_decode(void *vctx, OSSL_CORE_BIO *cin, int selection,
goto next;
}
buf = OPENSSL_malloc(length);
- if (buf == NULL) {
- ERR_raise(ERR_LIB_PEM, ERR_R_MALLOC_FAILURE);
+ if (buf == NULL)
goto end;
- }
p = buf;
if (BIO_read(in, buf, length) != (int)length) {
ERR_raise(ERR_LIB_PEM, PEM_R_KEYBLOB_TOO_SHORT);
@@ -282,7 +280,7 @@ static void rsa_adjust(void *key, struct msblob2key_ctx_st *ctx)
(void (*)(void))msblob2key_decode }, \
{ OSSL_FUNC_DECODER_EXPORT_OBJECT, \
(void (*)(void))msblob2key_export_object }, \
- { 0, NULL } \
+ OSSL_DISPATCH_END \
}
#ifndef OPENSSL_NO_DSA