From ca8e4841834e7ca84ec81bab9739f2eae044ccfd Mon Sep 17 00:00:00 2001 From: Maieul BOYER Date: Mon, 14 Oct 2024 14:09:48 +0200 Subject: [PATCH] update: fixed a leak --- Makefile | 5 +++-- sources/main.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 24b6d1b1..6f5a96af 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: rparodi +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2023/11/12 11:05:05 by rparodi #+# #+# # -# Updated: 2024/10/12 17:16:48 by maiboyer ### ########.fr # +# Updated: 2024/10/14 14:00:30 by maiboyer ### ########.fr # # # # **************************************************************************** # @@ -43,7 +43,8 @@ ifeq ($(shell uname), Darwin) endif endif -CFLAGS_ADDITIONAL += -DNVALGRIND +CFLAGS_ADDITIONAL ?= +#CFLAGS_ADDITIONAL += -DNVALGRIND # TODO: REMOVE THIS WHEN FINISHING THIS: # CFLAGS_ADDITIONAL += -fsanitize=memory -fno-omit-frame-pointer -fsanitize-memory-track-origins #-fuse-ld=lld -ffunction-sections -fdata-sections -Wl,--allow-multiple diff --git a/sources/main.c b/sources/main.c index 2828239e..67cfaae8 100644 --- a/sources/main.c +++ b/sources/main.c @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/28 14:40:38 by rparodi #+# #+# */ -/* Updated: 2024/10/14 13:57:51 by maiboyer ### ########.fr */ +/* Updated: 2024/10/14 14:01:19 by maiboyer ### ########.fr */ /* */ /* ************************************************************************** */ @@ -79,7 +79,7 @@ void append_default_env(t_hashmap_env *env) (void)((tmp != NULL) && (str_free(*tmp), 1)); if (u64_to_str(shlvl + 1, &tmp2)) me_abort("Failed to set SHLVL"); - hmap_env_insert(env, str_clone(key), str_clone(tmp2)); + hmap_env_insert(env, str_clone(key), tmp2); key = "PATH"; tmp = hmap_env_get(env, &key); if (tmp == NULL)