summaryrefslogtreecommitdiffstats
path: root/engines
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-02-29 14:12:37 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-02-29 14:12:37 +0000
commit2cf4bc9ecd4a701bc8cb9a0552c7dc2707f3c591 (patch)
tree445d8ed37fb68418b0ee0215d8377e095c9b53e0 /engines
parentc8ac945d59c4b303d61797620027253beda681d2 (diff)
PR: 2743
Reported by: Dmitry Belyavsky <beldmit@gmail.com> Fix memory leak if invalid GOST MAC key given.
Diffstat (limited to 'engines')
-rw-r--r--engines/ccgost/gost_pmeth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/ccgost/gost_pmeth.c b/engines/ccgost/gost_pmeth.c
index 4a05853e55..0bd08e9301 100644
--- a/engines/ccgost/gost_pmeth.c
+++ b/engines/ccgost/gost_pmeth.c
@@ -521,6 +521,7 @@ static int pkey_gost_mac_ctrl_str(EVP_PKEY_CTX *ctx,
{
GOSTerr(GOST_F_PKEY_GOST_MAC_CTRL_STR,
GOST_R_INVALID_MAC_KEY_LENGTH);
+ OPENSSL_free(keybuf);
return 0;
}
ret= pkey_gost_mac_ctrl(ctx, EVP_PKEY_CTRL_SET_MAC_KEY,