diff --git a/contribs/gnogenesis/internal/balances/balances_export.go b/contribs/gnogenesis/internal/balances/balances_export.go index df9d6795805..1970e348b1a 100644 --- a/contribs/gnogenesis/internal/balances/balances_export.go +++ b/contribs/gnogenesis/internal/balances/balances_export.go @@ -60,6 +60,7 @@ func execBalancesExport(cfg *balancesCfg, io commands.IO, args []string) error { if err != nil { return fmt.Errorf("unable to create output file, %w", err) } + defer outputFile.Close() // Save the balances for _, balance := range state.Balances {