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

@@ -25,7 +25,15 @@ cmd_sync :: proc(cmd: ^Command) {
return
}
results := make([]SyncEntry, len(files), context.temp_allocator)
// TODO: Can't use temp allocator becuase strings inside are copied to context.allocator
results := make([]SyncEntry, len(files))
defer {
for &e in results {
delete(e.Path)
delete(e.Status)
}
delete(results)
}
for &file, i in files {
result, err := db_sync(&db, &file)