mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-02 01:50:58 +02:00
Merge branch 'contrib/github_pr_17501' into 'master'
fix(esp_http_server): fix memory leak in httpd_req_async_handler_begin (GitHub PR) Closes IDFGH-16361 See merge request espressif/esp-idf!41748
This commit is contained in:
@@ -675,6 +675,7 @@ esp_err_t httpd_req_async_handler_begin(httpd_req_t *r, httpd_req_t **out)
|
|||||||
|
|
||||||
async_aux->resp_hdrs = calloc(hd->config.max_resp_headers, sizeof(struct resp_hdr));
|
async_aux->resp_hdrs = calloc(hd->config.max_resp_headers, sizeof(struct resp_hdr));
|
||||||
if (async_aux->resp_hdrs == NULL) {
|
if (async_aux->resp_hdrs == NULL) {
|
||||||
|
free(async_aux->scratch);
|
||||||
free(async_aux);
|
free(async_aux);
|
||||||
free(async);
|
free(async);
|
||||||
return ESP_ERR_NO_MEM;
|
return ESP_ERR_NO_MEM;
|
||||||
|
Reference in New Issue
Block a user