File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -436,6 +436,7 @@ static int PostAddRsaId(WOLFSSH_AGENT_CTX* agent,
436436 ret = wc_Sha256Update (& sha , key , nSz + eSz + (LENGTH_SZ * 2 ));
437437 if (ret == 0 )
438438 ret = wc_Sha256Final (& sha , id -> id );
439+ wc_Sha256Free (& sha );
439440
440441 if (ret == 0 )
441442 ret = WS_SUCCESS ;
@@ -518,6 +519,7 @@ static int PostAddEcdsaId(WOLFSSH_AGENT_CTX* agent,
518519 curveNameSz + qSz + (LENGTH_SZ * 2 ));
519520 if (ret == 0 )
520521 ret = wc_Sha256Final (& sha , id -> id );
522+ wc_Sha256Free (& sha );
521523
522524 if (ret == 0 )
523525 ret = WS_SUCCESS ;
@@ -584,6 +586,7 @@ static int PostRemoveId(WOLFSSH_AGENT_CTX* agent,
584586 ret = wc_Sha256Update (& sha , keyBlob , keyBlobSz );
585587 if (ret == 0 )
586588 ret = wc_Sha256Final (& sha , id );
589+ wc_Sha256Free (& sha );
587590 ret = (ret == 0 ) ? WS_SUCCESS : WS_CRYPTO_FAILED ;
588591 }
589592
@@ -661,6 +664,7 @@ static WOLFSSH_AGENT_ID* FindKeyId(WOLFSSH_AGENT_ID* id,
661664 ret = wc_Sha256Final (& sha , digest );
662665 ret = (ret == 0 ) ? WS_SUCCESS : WS_CRYPTO_FAILED ;
663666 }
667+ wc_Sha256Free (& sha );
664668
665669 if (ret == WS_SUCCESS ) {
666670 while (id != NULL &&
You can’t perform that action at this time.
0 commit comments