X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gost_prov.c;h=eab5918ac229adffdf5a74873197f5390d0c2364;hb=HEAD;hp=b4de15fe1e4974197bc6dbf2c7e33b1490a513ca;hpb=e847cc4876d2b105b119e0db1e4166d266642a66;p=openssl-gost%2Fengine.git diff --git a/gost_prov.c b/gost_prov.c index b4de15f..eab5918 100644 --- a/gost_prov.c +++ b/gost_prov.c @@ -49,7 +49,7 @@ static void provider_ctx_free(PROV_CTX *ctx) proverr_free_handle(ctx->proverr_handle); OSSL_LIB_CTX_free(ctx->libctx); } - free(ctx); + OPENSSL_free(ctx); } extern int populate_gost_engine(ENGINE *e); @@ -58,7 +58,7 @@ static PROV_CTX *provider_ctx_new(const OSSL_CORE_HANDLE *core, { 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