mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
[secure-transport] add ~SecureSession(void) destructor (#11553)
This commit adds a destructor for `SecureSession` which ensures the freeing of any mbedTls allocated items. This addresses memory leaks detected by fuzzer tests when `otInstance` is destroyed, though this situation is unlikely in typical OpenThread stack integrations.
This commit is contained in:
committed by
GitHub
parent
634605f940
commit
a7a45b0913
@@ -221,6 +221,7 @@ public:
|
||||
|
||||
protected:
|
||||
explicit SecureSession(SecureTransport &aTransport);
|
||||
~SecureSession(void) { FreeMbedtls(); }
|
||||
|
||||
bool IsSessionInUse(void) const { return (mNext != this); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user