From: Dr. Stephen Henson Date: Wed, 29 Feb 2012 14:12:52 +0000 (+0000) Subject: PR: 2743 X-Git-Tag: OpenSSL_1_0_1~17 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8e8b247341a7fe1a5c6f6e46cf099d90787a2dc8;p=oweals%2Fopenssl.git PR: 2743 Reported by: Dmitry Belyavsky Fix memory leak if invalid GOST MAC key given. --- 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,