Merge pull request #7616 from embhorn/zd17762

Static analysis fixes
This commit is contained in:
Daniel Pouzzner
2024-06-12 17:07:02 -04:00
committed by GitHub

View File

@ -7053,7 +7053,7 @@ void FreeHandshakeHashes(WOLFSSL* ssl)
int InitHandshakeHashesAndCopy(WOLFSSL* ssl, HS_Hashes* source,
HS_Hashes** destination)
{
int ret = 0;
int ret;
HS_Hashes* tmpHashes;
if (source == NULL)
@ -7063,7 +7063,11 @@ int InitHandshakeHashesAndCopy(WOLFSSL* ssl, HS_Hashes* source,
tmpHashes = ssl->hsHashes;
ssl->hsHashes = NULL;
InitHandshakeHashes(ssl);
ret = InitHandshakeHashes(ssl);
if (ret != 0) {
WOLFSSL_MSG_EX("InitHandshakeHashes failed. err = %d", ret);
return ret;
}
*destination = ssl->hsHashes;
ssl->hsHashes = tmpHashes;