Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2020-03-07 01:29:01 +0300
committerStan Hu <stanhu@gmail.com>2020-03-07 01:29:01 +0300
commit5033efb584146cd6d5b26bdc671ffa662a67a788 (patch)
treeec87c7a6c44bdc35484832bc638534d61af6f0af
parent4b2058c165f0559cba439c897501ad77c408d7bb (diff)
Fix database session leak
-rw-r--r--internal/praefect/nodes/manager.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/praefect/nodes/manager.go b/internal/praefect/nodes/manager.go
index c2929785a..07b077ff0 100644
--- a/internal/praefect/nodes/manager.go
+++ b/internal/praefect/nodes/manager.go
@@ -218,6 +218,7 @@ func (n *Mgr) lookupPrimary(shardName string) (*nodeStatus, error) {
n.log.Errorf("Error looking up primary: %s", err)
return nil, err
}
+ defer rows.Close()
for rows.Next() {
var name string