Merge branch 'bugfix/coverity_scan_warnings' into 'master'

Fix multiple coverity scan warnings

See merge request espressif/esp-idf!21014
This commit is contained in:
Mahavir Jain
2022-11-17 16:46:20 +08:00
2 changed files with 17 additions and 12 deletions

View File

@@ -290,8 +290,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;