Skip to content

Commit

Permalink
fix(ledger): segfault when error initializing storage driver (#1405)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag authored Apr 9, 2024
1 parent 5f315cf commit 7fcbe98
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions components/ledger/cmd/buckets.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,12 @@ func upgradeAll(cmd *cobra.Command, args []string) error {
}

driver := driver.New(*connectionOptions)
defer func() {
_ = driver.Close()
}()

if err := driver.Initialize(ctx); err != nil {
return err
}
defer func() {
_ = driver.Close()
}()

return driver.UpgradeAllBuckets(ctx)
}

0 comments on commit 7fcbe98

Please sign in to comment.