summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--store.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/store.go b/store.go
index 5eaea81..b3461b0 100644
--- a/store.go
+++ b/store.go
@@ -222,10 +222,10 @@ func (s *FilesystemStore) save(session *Session) error {
if err != nil {
return err
}
+ defer fp.Close()
if _, err = fp.Write([]byte(encoded)); err != nil {
return err
}
- fp.Close()
return nil
}