mirror of
https://github.com/espressif/openthread.git
synced 2026-08-06 02:37:47 +00:00
[cli] set mUseTls to false after de-initializing TCP session (#10977)
Avoid SSL context operations in TCP callbacks (for eg. `HandleTcpDisconnected`) when the context could have already been de-allocated after de-initialization.
This commit is contained in:
@@ -304,6 +304,8 @@ template <> otError TcpExample::Process<Cmd("deinit")>(Arg aArgs[])
|
||||
|
||||
mbedtls_pk_free(&mPKey);
|
||||
mbedtls_x509_crt_free(&mSrvCert);
|
||||
|
||||
mUseTls = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user