Skip to content

Commit 75d6307

Browse files
committed
Fix memory leak in handshake
Make sure peer dilithium keys are properly freed. Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de>
1 parent 491e70b commit 75d6307

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/internal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8906,6 +8906,10 @@ void FreeHandshakeResources(WOLFSSL* ssl)
89068906
FreeKey(ssl, DYNAMIC_TYPE_FALCON, (void**)&ssl->peerFalconKey);
89078907
ssl->peerFalconKeyPresent = 0;
89088908
#endif /* HAVE_FALCON */
8909+
#if defined(HAVE_DILITHIUM)
8910+
FreeKey(ssl, DYNAMIC_TYPE_DILITHIUM, (void**)&ssl->peerDilithiumKey);
8911+
ssl->peerDilithiumKeyPresent = 0;
8912+
#endif /* HAVE_DILITHIUM */
89098913
}
89108914

89118915
#ifdef HAVE_ECC

0 commit comments

Comments
 (0)