mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_https_server: fix coverity warning about null pointer dereference
This commit is contained in:
parent
16e18d9170
commit
8819aa2f38
@ -287,8 +287,10 @@ static httpd_ssl_ctx_t *create_secure_context(const struct httpd_ssl_config *con
|
||||
return ssl_ctx;
|
||||
|
||||
exit:
|
||||
free((void *) cfg->servercert_buf);
|
||||
free((void *) cfg->cacert_buf);
|
||||
if (cfg) {
|
||||
free((void *) cfg->servercert_buf);
|
||||
free((void *) cfg->cacert_buf);
|
||||
}
|
||||
free(cfg);
|
||||
free(ssl_ctx);
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user