Skip to content

Commit 5344d7f

Browse files
committed
fix: Memory leak in the bootstrap daemon
1 parent fa20168 commit 5344d7f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

other/bootstrap_daemon/src/config.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ bool get_general_config(const char *cfg_file_path, char **pid_file_path, char **
200200
*keys_file_path = (char *)malloc(keys_file_path_len);
201201
if (*keys_file_path == nullptr) {
202202
log_write(LOG_LEVEL_ERROR, "Allocation failure.\n");
203+
free(*pid_file_path);
204+
*pid_file_path = nullptr;
203205
return false;
204206
}
205207
memcpy(*keys_file_path, tmp_keys_file, keys_file_path_len);

0 commit comments

Comments
 (0)