diff --git a/Crypto/include/Poco/Crypto/EVPPKey.h b/Crypto/include/Poco/Crypto/EVPPKey.h index 7e096ff49..87ab962d4 100644 --- a/Crypto/include/Poco/Crypto/EVPPKey.h +++ b/Crypto/include/Poco/Crypto/EVPPKey.h @@ -195,9 +195,10 @@ private: poco_assert_dbg (typeid(K*) == typeid(EVP_PKEY*)); *ppKey = (K*)pKey; } - if(!*ppKey) goto error; + if (!*ppKey) goto error; return true; } + if (getFunc) EVP_PKEY_free(pKey); goto error; } else