Skip to content

Commit

Permalink
πŸ› destroy stats when no longer used
Browse files Browse the repository at this point in the history
  • Loading branch information
froz42 committed Nov 5, 2023
1 parent 19bc228 commit 8c38108
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion srcs/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ int main(int argc, char **argv, char **envp)
if (status == ROUTINE_ERROR)
return 1;
if (is_option_set(OPT_MASK_STATISTICS, config))
statistics_log(statistics_get());
{
statistics_t *statistics = statistics_get();
statistics_log(statistics);
statistics_destroy(statistics);
}
signals_unblock();
if (WIFSIGNALED(status))
raise(WTERMSIG(status));
Expand Down

0 comments on commit 8c38108

Please sign in to comment.