]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Fix of potential memory leak
authorDmitry Belyavskiy <beldmit@gmail.com>
Mon, 14 Oct 2019 14:28:41 +0000 (17:28 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Mon, 14 Oct 2019 14:28:41 +0000 (17:28 +0300)
Fixes #178

gost_omac_acpkm.c

index 793a6d3fe60ed16b5583282111dbadc874476371..c22524a3eab9c9044396d65b0d8bba5f3179929d 100644 (file)
@@ -68,6 +68,7 @@ static CMAC_ACPKM_CTX *CMAC_ACPKM_CTX_new(void)
     }
     ctx->actx = EVP_CIPHER_CTX_new();
     if (ctx->actx == NULL) {
+        EVP_CIPHER_CTX_free(ctx->cctx);
         OPENSSL_free(ctx);
         return NULL;
     }