Remove unnecessary null pointer check (#6370)

Further pointed out by @elfring, this patch removes one more unnecessary null pointer check.

https://github.com/meshtastic/firmware/issues/6170#issuecomment-2744002798
This commit is contained in:
Tom Fifield
2025-03-22 11:55:11 +11:00
committed by GitHub
parent 0951fdd49b
commit 1e4a0134e6

View File

@@ -223,10 +223,8 @@ void CryptoEngine::decrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes
// Generic implementation of AES-CTR encryption.
void CryptoEngine::encryptAESCtr(CryptoKey _key, uint8_t *_nonce, size_t numBytes, uint8_t *bytes)
{
if (ctr) {
delete ctr;
ctr = nullptr;
}
delete ctr;
ctr = nullptr;
if (_key.length == 16)
ctr = new CTR<AES128>();
else