fix: Fixed memory leaks in the db.

This commit is contained in:
2026-06-18 08:48:34 -04:00
parent d2b84ac4c6
commit 5059572951
9 changed files with 149 additions and 54 deletions

View File

@@ -220,7 +220,9 @@ envr_dir :: proc(config_path: string) -> string {
return filepath.dir(config_path)
}
data_path :: proc(config_path: string) -> string {
path, _ := filepath.join([]string{envr_dir(config_path), "data.envr"})
// User is responsible for freeing the path
data_path :: proc(config_path: string, allocator := context.allocator) -> string {
path, _ := filepath.join([]string{envr_dir(config_path), "data.envr"}, allocator)
return path
}