Browse Source

weed/storage/erasure_coding: Close() after error handling

pull/4826/head
Lars Lehtonen 1 year ago
committed by Chris Lu
parent
commit
f24c7e803f
  1. 2
      weed/storage/erasure_coding/ec_test.go

2
weed/storage/erasure_coding/ec_test.go

@ -43,10 +43,10 @@ func TestEncodingDecoding(t *testing.T) {
func validateFiles(baseFileName string) error {
nm, err := readNeedleMap(baseFileName)
defer nm.Close()
if err != nil {
return fmt.Errorf("readNeedleMap: %v", err)
}
defer nm.Close()
datFile, err := os.OpenFile(baseFileName+".dat", os.O_RDONLY, 0)
if err != nil {

Loading…
Cancel
Save