fix memory leaks and unecessary newlines in logs

This commit is contained in:
Nayan
2025-05-08 22:51:56 -04:00
parent 63a016cf36
commit 613e87ad86
4 changed files with 10 additions and 4 deletions

View File

@@ -37,9 +37,10 @@ void* client_handler(void* args) {
send(client, response->body, response->content_length, 0);
send(client, "\r\n", 2, 0);
free(response);
return NULL;
free_http_response(response);
free(headers);
}
free(buffer);
free(args);
return NULL;
}