From cec56b5d601c3f3f09841dd0c24cae6ea3d734d8 Mon Sep 17 00:00:00 2001 From: ame Date: Tue, 13 Feb 2024 14:14:20 -0600 Subject: idk --- src/net.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/net.c') diff --git a/src/net.c b/src/net.c index e39685b..c3239e5 100644 --- a/src/net.c +++ b/src/net.c @@ -397,6 +397,7 @@ void* handle_client(void *_arg){ void* v = parray_find(paths, aa->c); + str_free(aa); if(v == NULL){ str* resp; http_build(&resp, 404, "Not Found","text/html", "

404

"); @@ -461,7 +462,7 @@ void* handle_client(void *_arg){ } } } - parray_lclear(owo); + parray_lclear(owo); //dont free the rest lua_pushstring(L, "client_fd"); lua_gettable(L, res_idx); @@ -471,7 +472,7 @@ void* handle_client(void *_arg){ } - for(int i = 0; i != len; i++){ + for(int i = 0; i != len * 2; i++){ str_free(table[i]); } free(table); @@ -556,6 +557,7 @@ int start_serv(lua_State* L, int port){ pthread_create(&thread_id, NULL, handle_client, (void*)args); pthread_detach(thread_id); + free(client_fd); } } -- cgit v1.2.3