fix: Fixed leaks.

This commit is contained in:
2026-06-19 14:53:42 -04:00
parent 0083e4e0db
commit e7da6f60e1
4 changed files with 22 additions and 4 deletions

View File

@@ -407,7 +407,7 @@ new_env_file :: proc(path: string) -> (EnvFile, bool) {
digest := hash.hash_bytes(hash.Algorithm.SHA256, data, context.temp_allocator)
// TODO: Handle error
hex_bytes, _ := hex.encode(digest)
hex_bytes, _ := hex.encode(digest, context.temp_allocator)
return EnvFile {
Path = abs_path,
@@ -550,6 +550,7 @@ get_git_remotes :: proc(dir: string, allocator: mem.Allocator) -> [dynamic]strin
if r == url {found = true; break}
}
if !found {
// FIXME: Currently leaks when adding a file with envr scan
cloned, _ := strings.clone(url, allocator)
append(&remotes, cloned)
}