aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-08-18 19:16:56 +0200
committerRobin Jarry <robin@jarry.cc>2023-08-26 21:41:05 +0200
commit9e171691cd3c4a5055fef4f43cab2dd790f8c061 (patch)
tree0344040ca011ad7512170315f4dec7e3b3cdeeac
parentb919c0451c03e785c31eeea3a3b18b76492b6504 (diff)
downloadaerc-9e171691cd3c4a5055fef4f43cab2dd790f8c061.tar.gz
wizard: close open file
Avoid leaking open file descriptors. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
-rw-r--r--widgets/account-wizard.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/widgets/account-wizard.go b/widgets/account-wizard.go
index 7fa371fc..c76a67e7 100644
--- a/widgets/account-wizard.go
+++ b/widgets/account-wizard.go
@@ -521,6 +521,7 @@ func (wizard *AccountWizard) finish(tutorial bool) {
wizard.errorFor(nil, err)
return
}
+ defer f.Close()
if _, err = file.WriteTo(f); err != nil {
wizard.errorFor(nil, err)
return