From 5344d7f84d060311f2147b343cdd3fd4c433d7dd Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Wed, 3 Apr 2024 23:20:12 -0400 Subject: [PATCH] fix: Memory leak in the bootstrap daemon --- other/bootstrap_daemon/src/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/other/bootstrap_daemon/src/config.c b/other/bootstrap_daemon/src/config.c index 891912dce1..05e473554d 100644 --- a/other/bootstrap_daemon/src/config.c +++ b/other/bootstrap_daemon/src/config.c @@ -200,6 +200,8 @@ bool get_general_config(const char *cfg_file_path, char **pid_file_path, char ** *keys_file_path = (char *)malloc(keys_file_path_len); if (*keys_file_path == nullptr) { log_write(LOG_LEVEL_ERROR, "Allocation failure.\n"); + free(*pid_file_path); + *pid_file_path = nullptr; return false; } memcpy(*keys_file_path, tmp_keys_file, keys_file_path_len);