Stop raising ERR_R_MALLOC_FAILURE in most places
[openssl.git] / providers / implementations / macs / kmac_prov.c
index 123c40f54f87484bc549d367007e12cd56405215..7c1ce18ac75875c4ae2fb2e90a979458e906db7b 100644 (file)
@@ -310,10 +310,8 @@ static int kmac_init(void *vmacctx, const unsigned char *key,
         return 0;
     }
     out = OPENSSL_malloc(out_len);
-    if (out == NULL) {
-        ERR_raise(ERR_LIB_PROV, ERR_R_MALLOC_FAILURE);
+    if (out == NULL)
         return 0;
-    }
     res = bytepad(out, NULL, kmac_string, sizeof(kmac_string),
                   kctx->custom, kctx->custom_len, block_len)
           && EVP_DigestUpdate(ctx, out, out_len)