Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

fix: ensure rows are closed (#670)

Hayden1cc9bf459ab3
diff --git a/backend/internal/data/repo/repo_locations.go b/backend/internal/data/repo/repo_locations.go
index 261ff501..c826ebee 100644
--- a/backend/internal/data/repo/repo_locations.go
+++ b/backend/internal/data/repo/repo_locations.go
@@ -135,6 +135,7 @@ func (r *LocationRepository) GetAll(ctx context.Context, GID uuid.UUID, filter L
if err != nil {
return nil, err
}
+ defer rows.Close()
list := []LocationOutCount{}
for rows.Next() {
@@ -285,6 +286,7 @@ func (lr *LocationRepository) PathForLoc(ctx context.Context, GID, locID uuid.UU
if err != nil {
return nil, err
}
+ defer rows.Close()
var locations []LocationPath