F-5633: use explicit NULL comparison in FreeCiphers

Use the project's preferred `ptr != NULL` form for the new DTLS 1.3 ChaCha
record-number zeroization guards instead of relying on truthiness.
This commit is contained in:
Juliusz Sosinowicz
2026-06-11 19:22:36 +00:00
parent 5e76c66977
commit 108afdf1c3
+2 -2
View File
@@ -3343,9 +3343,9 @@ void FreeCiphers(WOLFSSL* ssl)
ssl->dtlsRecordNumberDecrypt.aes = NULL;
#endif /* BUILD_AES */
#ifdef HAVE_CHACHA
if (ssl->dtlsRecordNumberEncrypt.chacha)
if (ssl->dtlsRecordNumberEncrypt.chacha != NULL)
ForceZero(ssl->dtlsRecordNumberEncrypt.chacha, sizeof(ChaCha));
if (ssl->dtlsRecordNumberDecrypt.chacha)
if (ssl->dtlsRecordNumberDecrypt.chacha != NULL)
ForceZero(ssl->dtlsRecordNumberDecrypt.chacha, sizeof(ChaCha));
XFREE(ssl->dtlsRecordNumberEncrypt.chacha, ssl->heap, DYNAMIC_TYPE_CIPHER);
XFREE(ssl->dtlsRecordNumberDecrypt.chacha, ssl->heap, DYNAMIC_TYPE_CIPHER);