]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Avoid memory leak
authorDmitry Belyavskiy <beldmit@gmail.com>
Tue, 25 Dec 2018 15:18:59 +0000 (18:18 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Tue, 25 Dec 2018 15:18:59 +0000 (18:18 +0300)
gost_omac.c

index 0cbd45d2dd02a7913ba2bf382889da048e6a7b23..b4a4ed2baa4dba44fa09bcdae3dd35a044610fae 100644 (file)
@@ -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);