From: Dmitry Belyavskiy Date: Tue, 25 Dec 2018 15:18:59 +0000 (+0300) Subject: Avoid memory leak X-Git-Tag: v3.0.0~323 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;ds=inline;h=5639e179f1e378cd96336e639fa1eaceffc37521;p=openssl-gost%2Fengine.git Avoid memory leak --- diff --git a/gost_omac.c b/gost_omac.c index 0cbd45d..b4a4ed2 100644 --- a/gost_omac.c +++ b/gost_omac.c @@ -132,6 +132,7 @@ static int omac_key(OMAC_CTX * c, const EVP_CIPHER *cipher, { int ret = 0; + CMAC_CTX_free(c->cmac_ctx);, c->cmac_ctx = CMAC_CTX_new(); if (c->cmac_ctx == NULL) { GOSTerr(GOST_F_OMAC_KEY, ERR_R_MALLOC_FAILURE);