mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 20:24:32 +02:00
esp_wifi: Fixed null pointer dereference
This commit is contained in:
committed by
zhangyanjiao
parent
c01c7acdab
commit
459674c444
@@ -510,6 +510,10 @@ struct tls_connection * tls_connection_init(void *tls_ctx)
|
|||||||
|
|
||||||
void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn)
|
void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn)
|
||||||
{
|
{
|
||||||
|
/* case: tls init failed */
|
||||||
|
if(!conn) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/* Free ssl ctx and data */
|
/* Free ssl ctx and data */
|
||||||
tls_mbedtls_conn_delete((tls_context_t *) conn->tls);
|
tls_mbedtls_conn_delete((tls_context_t *) conn->tls);
|
||||||
os_free(conn->tls);
|
os_free(conn->tls);
|
||||||
|
Reference in New Issue
Block a user