From 86896945f9248f37a573f9f67344e7d29a7cf309 Mon Sep 17 00:00:00 2001 From: adjoly Date: Thu, 1 May 2025 17:00:34 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=94=A8=E3=80=8D=20fix:=20fixed?= =?UTF-8?q?=20leak=20with=20=5Fdefault=20table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exemples/test.toml | 4 ++-- src/config/Config.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/exemples/test.toml b/exemples/test.toml index 22c87b2..f5cdb22 100644 --- a/exemples/test.toml +++ b/exemples/test.toml @@ -29,10 +29,10 @@ redirect = "https://kanel.ovh" host = "127.0.0.1" port = 9090 -[serverr.error_pages] +[default.error_pages] 404 = "existepasfd***.html" -[serverr.location./] +[default.location./] methods = { "GET", "DELETE" } root = "/var/lib/docker/volumes/test_data/_data" dirlist = false diff --git a/src/config/Config.cpp b/src/config/Config.cpp index bb1d1ae..2ec0eba 100644 --- a/src/config/Config.cpp +++ b/src/config/Config.cpp @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/14 12:53:54 by adjoly #+# #+# */ -/* Updated: 2025/05/01 16:31:45 by adjoly ### ########.fr */ +/* Updated: 2025/05/01 17:00:00 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -74,4 +74,5 @@ Config::~Config(void) { for (auto it = range(_servers)) { delete *it; } + delete _default; }