You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ra...@apache.org on 2018/10/04 14:39:39 UTC
[trafficcontrol] 07/10: Fix TO Go missing inf.Close()
This is an automated email from the ASF dual-hosted git repository.
rawlin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
commit 1e23a16e747430ff0e8d9797e6db460dde69d4dd
Author: Robert Butts <ro...@apache.org>
AuthorDate: Mon Oct 1 21:04:25 2018 -0600
Fix TO Go missing inf.Close()
---
traffic_ops/traffic_ops_golang/federations/allfederations.go | 1 +
traffic_ops/traffic_ops_golang/federations/federations.go | 1 +
2 files changed, 2 insertions(+)
diff --git a/traffic_ops/traffic_ops_golang/federations/allfederations.go b/traffic_ops/traffic_ops_golang/federations/allfederations.go
index 04d15ba..109464e 100644
--- a/traffic_ops/traffic_ops_golang/federations/allfederations.go
+++ b/traffic_ops/traffic_ops_golang/federations/allfederations.go
@@ -34,6 +34,7 @@ func GetAll(w http.ResponseWriter, r *http.Request) {
api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
return
}
+ defer inf.Close()
feds := []FedInfo{}
err := error(nil)
diff --git a/traffic_ops/traffic_ops_golang/federations/federations.go b/traffic_ops/traffic_ops_golang/federations/federations.go
index 29c9a60..7c984f6 100644
--- a/traffic_ops/traffic_ops_golang/federations/federations.go
+++ b/traffic_ops/traffic_ops_golang/federations/federations.go
@@ -39,6 +39,7 @@ func Get(w http.ResponseWriter, r *http.Request) {
api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
return
}
+ defer inf.Close()
feds, err := getUserFederations(inf.Tx.Tx, inf.User)
if err != nil {