Mercurial
diff seobeo/s_web.c @ 16:fb2cff495a60
[Seobeo] Fixed the problem with edge server.
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Fri, 03 Oct 2025 09:55:51 -0700 |
| parents | 114cad94008f |
| children | d97ec3ded2ae |
line wrap: on
line diff
--- a/seobeo/s_web.c Fri Oct 03 06:50:33 2025 -0700 +++ b/seobeo/s_web.c Fri Oct 03 09:55:51 2025 -0700 @@ -139,9 +139,12 @@ Seobeo_Handle_Flush(p_cli_handle); clean_up: - Seobeo_Handle_Destroy(p_cli_handle); - Dowa_Arena_Free(p_response_arena); - Dowa_HashMap_Free(p_req_map); // TODO: Maybe initilized hashmap within the Arena? + if (p_cli_handle) + Seobeo_Handle_Destroy(p_cli_handle); + if (p_response_arena) + Dowa_Arena_Free(p_response_arena); + if (p_req_map) + Dowa_HashMap_Free(p_req_map); // TODO: Maybe initilized hashmap within the Arena? } int Seobeo_Web_ParseClientHeader(Seobeo_PHandle p_handle, Dowa_PHashMap map) @@ -286,7 +289,8 @@ Seobeo_Stream_Handle_Accept(p_server_handle); if (!cli) continue; - if (fork() == 0) { + if (fork() == 0) + { Seobeo_Web_HandleClientRequest(cli, p_html_cache); _exit(0);