From a3dc3f3ad73a35302671e7865cdf4a406faff4ac Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 30 May 2011 16:39:56 -0700 Subject: [PATCH] close stmt on exit? --- lib/go/camli/mysqlindexer/search.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/go/camli/mysqlindexer/search.go b/lib/go/camli/mysqlindexer/search.go index 1854431d3..6df25d116 100644 --- a/lib/go/camli/mysqlindexer/search.go +++ b/lib/go/camli/mysqlindexer/search.go @@ -133,6 +133,7 @@ func (mi *Indexer) GetOwnerClaims(permanode, owner *blobref.BlobRef) (claims sea var row claimsRow stmt.BindResult(&row.blobref, &row.date, &row.claim, &row.attr, &row.value) + defer stmt.Close() for { done, err := stmt.Fetch() if err != nil { @@ -185,6 +186,7 @@ func (mi *Indexer) GetBlobMimeType(blob *blobref.BlobRef) (mime string, size int } stmt.BindResult(&mime, &size) + defer stmt.Close() ok := false for { done, err := stmt.Fetch()