Skip to content

Commit

Permalink
Merge branch 'bugfix/tcp_transport_null_deref' into 'master'
Browse files Browse the repository at this point in the history
tcp_transport: Fix NULL pointer deference in esp_tls_create (GitHub PR)

Closes IDFGH-5834

See merge request espressif/esp-idf!15125
  • Loading branch information
david-cermak committed Sep 15, 2021
2 parents 6704f4c + 9d07e89 commit 29fac4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/tcp_transport/transport_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 29fac4f

Please sign in to comment.