From 740b8eec48f26bec45da6c02fa770f57b9258261 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 20 Sep 2013 12:23:28 +0100 Subject: [PATCH] Close static-set blob after done parsing it. Fixes http://camlistore.org/issue/230 I think. No test, though. Change-Id: I3b23d7e4c39bd19ba6ca9e33ec382fe3e0fd33f2 --- pkg/schema/dirreader.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/schema/dirreader.go b/pkg/schema/dirreader.go index f89594610..04215d2a7 100644 --- a/pkg/schema/dirreader.go +++ b/pkg/schema/dirreader.go @@ -94,6 +94,7 @@ func (dr *DirReader) StaticSet() ([]blob.Ref, error) { if err != nil { return nil, fmt.Errorf("schema/filereader: fetching schema blob %s: %v", staticSetBlobref, err) } + defer rsc.Close() ss, err := parseSuperset(rsc) if err != nil { return nil, fmt.Errorf("schema/filereader: decoding schema blob %s: %v", staticSetBlobref, err)