Skip to content

Commit

Permalink
Ensure the go-rpmdb is closed
Browse files Browse the repository at this point in the history
Signed-off-by: Brad P. Crochet <brad@redhat.com>
  • Loading branch information
bcrochet authored and acornett21 committed May 7, 2024
1 parent 7abf1ac commit 7f1ff3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/rpm/rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ func GetPackageList(ctx context.Context, basePath string) ([]*rpmdb.PackageInfo,
if err != nil {
return nil, fmt.Errorf("could not open rpm db: %v", err)
}
defer db.Close()

pkgList, err := db.ListPackages()
if err != nil {
return nil, fmt.Errorf("could not list packages: %v", err)
Expand Down

0 comments on commit 7f1ff3a

Please sign in to comment.