diff --git a/publisher/publisher.go b/publisher/publisher.go index be4472791..de9b03d0d 100644 --- a/publisher/publisher.go +++ b/publisher/publisher.go @@ -108,6 +108,7 @@ func (p DestinationPublisher) Publish(d Descriptor) error { if err != nil { return err } + defer f.Close() _, err = io.Copy(f, src) if err == nil && d.StatCounter != nil {