From 3353d8404adf0d5dd3c23915a0b4c90e3e8a37b5 Mon Sep 17 00:00:00 2001 From: Harshit Malpani Date: Tue, 29 Nov 2022 16:56:22 +0530 Subject: [PATCH] esp_http_server: fix wrong context pointer in httpd_req_cleanup function Added example which fails without the fix Closes https://github.com/espressif/esp-idf/issues/10265 --- components/esp_http_server/src/httpd_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_http_server/src/httpd_parse.c b/components/esp_http_server/src/httpd_parse.c index 0979da0632..2783b980a1 100644 --- a/components/esp_http_server/src/httpd_parse.c +++ b/components/esp_http_server/src/httpd_parse.c @@ -694,7 +694,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