Merge branch 'bugfix/fix_httpd_req_cleanup' into 'master'

esp_http_server: fix wrong context pointer in httpd_req_cleanup function

Closes IDFGH-8842

See merge request espressif/esp-idf!21320
This commit is contained in:
Mahavir Jain
2022-12-19 14:40:24 +08:00
5 changed files with 82 additions and 1 deletions

View File

@@ -695,7 +695,7 @@ static void httpd_req_cleanup(httpd_req_t *r)
/* Check if the context has changed and needs to be cleared */
if ((r->ignore_sess_ctx_changes == false) && (ra->sd->ctx != r->sess_ctx)) {
httpd_sess_free_ctx(ra->sd->ctx, ra->sd->free_ctx);
httpd_sess_free_ctx(&ra->sd->ctx, ra->sd->free_ctx);
}
#if CONFIG_HTTPD_WS_SUPPORT