🔨」 fix: fixed leak

This commit is contained in:
2025-04-25 17:22:15 +02:00
parent 5ce135594b
commit 202a403430
6 changed files with 38 additions and 27 deletions

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/17 11:12:41 by mmoussou #+# #+# */
/* Updated: 2025/04/25 15:28:08 by adjoly ### ########.fr */
/* Updated: 2025/04/25 17:03:35 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -17,10 +17,16 @@
using namespace webserv::server;
Client::Client(struct pollfd *pfd, sockaddr_in socket, config::Config *conf)
: _toClose(false), _pfd(pfd), _client_addr(socket), _Gconf(conf) {
: _pfd(pfd), _client_addr(socket), _Gconf(conf) {
log("", "Client", "constructor called");
}
Client::Client(const Client &cpy) {
if (this != &cpy) {
_pfd->fd = cpy._pfd->fd;
}
}
void Client::parse(void) {
std::string received_data;
char buffer[BUFFER_SIZE];
@ -83,6 +89,5 @@ void Client::answer(void) {
Client::~Client(void) {
log("", "Client", "destructor called");
//delete _pfd;
delete (http::Get *)(this->_request);
}