From 85c8e4701606c7e4f1850414d467352f436a0e9e Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Fri, 15 Dec 2023 21:07:17 -0600 Subject: [PATCH] fix: ensure rows are closed (#670) --- backend/internal/data/repo/repo_locations.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/internal/data/repo/repo_locations.go b/backend/internal/data/repo/repo_locations.go index 261ff50..c826ebe 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