From 6459c850752cc89870b46eda8038817555a9af6a Mon Sep 17 00:00:00 2001 From: guangwu Date: Fri, 19 Apr 2024 19:13:34 +0800 Subject: [PATCH] fix: close rpmdb (#3798) --- providers/os/resources/packages/rpm_packages.go | 1 + 1 file changed, 1 insertion(+) diff --git a/providers/os/resources/packages/rpm_packages.go b/providers/os/resources/packages/rpm_packages.go index b2b91dda3b..ec46545a81 100644 --- a/providers/os/resources/packages/rpm_packages.go +++ b/providers/os/resources/packages/rpm_packages.go @@ -249,6 +249,7 @@ func (rpm *RpmPkgManager) staticList() ([]Package, error) { if err != nil { return nil, err } + defer db.Close() pkgList, err := db.ListPackages() if err != nil { return nil, err