mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 13:40:49 +02:00
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:
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user