fix: ensure rows are closed (#670)

Former-commit-id: 85c8e47016
This commit is contained in:
Hayden 2023-12-15 21:07:17 -06:00 committed by GitHub
parent 0c535aa8d8
commit 1cc9bf459a

View file

@ -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