ensure rows are closed

This commit is contained in:
Hayden 2023-12-15 20:58:40 -06:00
parent 8538877f52
commit 36816f6c91
No known key found for this signature in database
GPG key ID: 17CF79474E257545

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