Skip to content

Commit

Permalink
fix: Memory leak in the bootstrap daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
nurupo committed Apr 4, 2024
1 parent fa20168 commit 5344d7f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions other/bootstrap_daemon/src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5344d7f

Please sign in to comment.