mirror of
https://github.com/espressif/openthread.git
synced 2026-08-28 12:59:54 +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:
@@ -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