Browse Source

filer: reset bytesBuffer before use

pull/2727/head
banjiaojuhao 3 years ago
parent
commit
a07c93f4dd
  1. 1
      weed/filer/filechunk_manifest.go

1
weed/filer/filechunk_manifest.go

@ -85,6 +85,7 @@ func ResolveOneChunkManifest(lookupFileIdFn wdclient.LookupFileIdFunctionType, c
// IsChunkManifest
bytesBuffer := bytesBufferPool.Get().(*bytes.Buffer)
bytesBuffer.Reset()
defer bytesBufferPool.Put(bytesBuffer)
err := fetchWholeChunk(bytesBuffer, lookupFileIdFn, chunk.GetFileIdString(), chunk.CipherKey, chunk.IsCompressed)
if err != nil {

Loading…
Cancel
Save