From 48208d09913da362fdec81f580b8db25b33cdcdd Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 31 Aug 2024 13:02:32 +0200 Subject: [PATCH] fixed double memory leak in init_config fn --- src/chat/config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/chat/config.c b/src/chat/config.c index 9d23958..4c0feab 100644 --- a/src/chat/config.c +++ b/src/chat/config.c @@ -69,11 +69,13 @@ void init_config(char *filename) //CLEANUP curl_easy_cleanup(curl); - why2_deallocate(buffer); - why2_deallocate(path); why2_deallocate(config_dir); why2_deallocate(file_buffer); } + + //DEALLOCATION + why2_deallocate(path); + why2_deallocate(buffer); } char *config(char *key, enum CONFIG_TYPES type)