aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-07-19 00:22:47 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2017-07-19 00:22:47 +0200
commit07305b25d9d310a3aa92bd636068809f08ab00a2 (patch)
treee263bddba5c63221a69cdd3ad5aab4059fabcde8
parent1675edbff5055189d958244b6e0ded9f5d37fe91 (diff)
downloadgo-git-07305b25d9d310a3aa92bd636068809f08ab00a2.tar.gz
worktree: close .gitmodule files
-rw-r--r--worktree.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/worktree.go b/worktree.go
index ae1ab28..63eb25b 100644
--- a/worktree.go
+++ b/worktree.go
@@ -498,6 +498,7 @@ func (w *Worktree) readGitmodulesFile() (*config.Modules, error) {
return nil, err
}
+ defer f.Close()
input, err := stdioutil.ReadAll(f)
if err != nil {
return nil, err