Commit ae7bf3e6 authored by FengyunPan's avatar FengyunPan

Fix missing close file

parent 5dd56c9b
...@@ -167,6 +167,7 @@ func TestUtilSaveConfig(t *testing.T) { ...@@ -167,6 +167,7 @@ func TestUtilSaveConfig(t *testing.T) {
if err != nil { if err != nil {
t.Fatal("failed to open conf file: ", file) t.Fatal("failed to open conf file: ", file)
} }
defer file.Close()
dataRcvd := map[string]string{} dataRcvd := map[string]string{}
if err := gob.NewDecoder(file).Decode(&dataRcvd); err != nil { if err := gob.NewDecoder(file).Decode(&dataRcvd); err != nil {
t.Fatal(err) t.Fatal(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment