summaryrefslogtreecommitdiff
path: root/actions/ostree_deploy_action.go
diff options
context:
space:
mode:
Diffstat (limited to 'actions/ostree_deploy_action.go')
-rw-r--r--actions/ostree_deploy_action.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/actions/ostree_deploy_action.go b/actions/ostree_deploy_action.go
index 7d6e6bd..7353691 100644
--- a/actions/ostree_deploy_action.go
+++ b/actions/ostree_deploy_action.go
@@ -55,7 +55,6 @@ import (
"io"
"os"
"path"
- "runtime"
"strings"
"github.com/go-debos/debos"
@@ -198,6 +197,11 @@ func (ot *OstreeDeployAction) Run(context *debos.DebosContext) error {
return err
}
- runtime.GC()
+ /* libostree keeps some information, like repo lock file descriptor, in
+ * thread specific variables. As GC can be run from another thread, it
+ * may not been able to access this, preventing to free them correctly.
+ * To prevent this, explicitly dereference libostree objects. */
+ dstRepo.Unref()
+ sysroot.Unref()
return nil
}