Mercurial
comparison seobeo/s_http_client.c @ 168:f3084bca7317
[Misc] Fixed all errors and all tests should pass now.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 19 Jan 2026 16:29:02 -0800 |
| parents | 058de208e640 |
| children | 71ad34a8bc9a |
comparison
equal
deleted
inserted
replaced
| 167:589bab390fb4 | 168:f3084bca7317 |
|---|---|
| 539 return; | 539 return; |
| 540 | 540 |
| 541 if (p_req->p_arena) | 541 if (p_req->p_arena) |
| 542 Dowa_Arena_Free(p_req->p_arena); | 542 Dowa_Arena_Free(p_req->p_arena); |
| 543 | 543 |
| 544 if (p_req->headers_map) | 544 // Note: headers_map and headers_array are allocated using arena functions |
| 545 Dowa_HashMap_Free(p_req->headers_map); | 545 // (Dowa_HashMap_Push_Arena, Dowa_Array_Push_Arena), so they are freed |
| 546 | 546 // when the arena is freed above. Do not call Dowa_HashMap_Free or |
| 547 if (p_req->headers_array) | 547 // Dowa_Array_Free on them. |
| 548 Dowa_Array_Free(p_req->headers_array); | |
| 549 | 548 |
| 550 free(p_req); | 549 free(p_req); |
| 551 } | 550 } |
| 552 | 551 |
| 553 void Seobeo_Client_Response_Destroy(Seobeo_Client_Response *p_resp) | 552 void Seobeo_Client_Response_Destroy(Seobeo_Client_Response *p_resp) |
| 556 return; | 555 return; |
| 557 | 556 |
| 558 if (p_resp->p_arena) | 557 if (p_resp->p_arena) |
| 559 Dowa_Arena_Free(p_resp->p_arena); | 558 Dowa_Arena_Free(p_resp->p_arena); |
| 560 | 559 |
| 561 if (p_resp->headers) | 560 // Note: headers are allocated using Dowa_HashMap_Push_Arena, so they are |
| 562 Dowa_HashMap_Free(p_resp->headers); | 561 // freed when the arena is freed above. Do not call Dowa_HashMap_Free. |
| 563 | 562 |
| 564 free(p_resp); | 563 free(p_resp); |
| 565 } | 564 } |