From 052817ff919b7d69b9dda1c5828c200ceca87dad Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Sun, 5 Apr 2015 21:33:24 -0700 Subject: [PATCH] Fix fd leak --- pkg/drivers/donut/donut.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/drivers/donut/donut.go b/pkg/drivers/donut/donut.go index d29ca2f33..4252ee040 100644 --- a/pkg/drivers/donut/donut.go +++ b/pkg/drivers/donut/donut.go @@ -194,6 +194,7 @@ func (d donutDriver) GetPartialObject(w io.Writer, bucketName, objectName string return 0, drivers.BucketNotFound{Bucket: bucketName} } reader, size, err := buckets[bucketName].GetObject(objectName) + defer reader.Close() if err != nil { return 0, drivers.ObjectNotFound{ Bucket: bucketName,