Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory corruption when reloading #1413

Merged
merged 4 commits into from
Dec 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix another memleak
  • Loading branch information
bynect committed Dec 13, 2024
commit 5642325ed6d21b8ece85006c9602d9872c6ca894
3 changes: 3 additions & 0 deletions src/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ static void config_files_add_drop_ins(GPtrArray *config_files, const char *path)

if (n == -1) {
// Scandir error. Most likely the directory doesn't exist.
g_free(drop_in_dir);
return;
}

Expand All @@ -98,6 +99,8 @@ static void config_files_add_drop_ins(GPtrArray *config_files, const char *path)
g_ptr_array_insert(config_files, insert_index, drop_in);
g_free(drop_ins[n]);
}

g_free(drop_in_dir);
g_free(drop_ins);
}

Expand Down
Loading