Merge branch 'fix/coverity_issue_483747' into 'master'

Fix possible double memory free in esp_http_client

Closes IDF-13757, IDF-13758, and IDF-13755

See merge request espressif/esp-idf!40934
This commit is contained in:
Mahavir Jain
2025-08-20 14:29:20 +05:30
3 changed files with 31 additions and 30 deletions

View File

@@ -350,6 +350,7 @@ static int http_on_body(http_parser *parser, const char *at, size_t length)
ESP_LOGE(TAG, "Failed to allocate memory for storing decoded data");
free(res_buffer->orig_raw_data);
res_buffer->orig_raw_data = NULL;
res_buffer->raw_data = NULL;
return -1;
}
res_buffer->orig_raw_data = tmp;