Merge branch 'bugfix/tcp_transport_null_deref' into 'master'

tcp_transport: Fix NULL pointer deference in esp_tls_create (GitHub PR)

Closes IDFGH-5834

See merge request espressif/esp-idf!15125
This commit is contained in:
David Čermák 2021-09-15 06:06:17 +00:00
commit 29fac4faa0

View File

@ -446,6 +446,9 @@ esp_transport_handle_t esp_transport_ssl_init(void)
struct transport_esp_tls* esp_transport_esp_tls_create(void)
{
transport_esp_tls_t *transport_esp_tls = calloc(1, sizeof(transport_esp_tls_t));
if (transport_esp_tls == NULL) {
return NULL;
}
transport_esp_tls->sockfd = INVALID_SOCKET;
return transport_esp_tls;
}