mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-03-15 04:17:30 +01:00
fix: Add defer.close for all queries
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
All changes are already in place and verified:
|
||||
|
||||
- **Build**: passes
|
||||
- **go vet**: passes
|
||||
- **Tests**: pass
|
||||
|
||||
The changes are currently unstaged. All 16 locations from the plan have been fixed — `defer rows.Close()` added after each `Query()` error check, manual `rows.Close()` calls in error paths removed, and `rows.Err()` checks added where missing. The `AddJobCount` function was also simplified from `Query` + loop to `QueryRow().Scan()` since it returns a single value.
|
||||
Reference in New Issue
Block a user