diff --git a/hamilton.go b/hamilton.go index 3e2cb78..a4147db 100644 --- a/hamilton.go +++ b/hamilton.go @@ -31,6 +31,7 @@ var step int func writeGraphfile(g [][]int, path []int) { filename := fmt.Sprintf("step%07d.dot", step) f, _ := os.Create(filename) + defer f.Close() step++ fmt.Fprintln(f, "digraph {") fmt.Fprintln(f, "dpi=200")