#3260: Memory leak in EVPPKey::loadKey used with files & wrong password

This commit is contained in:
Günter Obiltschnig 2021-06-15 14:43:21 +02:00
parent aa32399e26
commit f5de69b854

View File

@ -195,9 +195,10 @@ private:
poco_assert_dbg (typeid(K*) == typeid(EVP_PKEY*)); poco_assert_dbg (typeid(K*) == typeid(EVP_PKEY*));
*ppKey = (K*)pKey; *ppKey = (K*)pKey;
} }
if(!*ppKey) goto error; if (!*ppKey) goto error;
return true; return true;
} }
if (getFunc) EVP_PKEY_free(pKey);
goto error; goto error;
} }
else else