mirror of
https://github.com/sbrow/envr.git
synced 2026-06-27 18:48:33 -04:00
fix: Fixed leaks.
This commit is contained in:
3
db.odin
3
db.odin
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user