proverr_free_handle(ctx->proverr_handle);
OSSL_LIB_CTX_free(ctx->libctx);
}
- free(ctx);
+ OPENSSL_free(ctx);
}
extern int populate_gost_engine(ENGINE *e);
{
PROV_CTX *ctx;
- if ((ctx = malloc(sizeof(*ctx))) != NULL
+ if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) != NULL
&& (ctx->proverr_handle = proverr_new_handle(core, in)) != NULL
&& (ctx->libctx = OSSL_LIB_CTX_new()) != NULL
&& (ctx->e = ENGINE_new()) != NULL