From e45d5b09b768d1064e998b154c1801efd9747811 Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Fri, 25 Oct 2024 15:48:01 +0200 Subject: [PATCH] [CWS] correctly reset callbacks of pce on reset (#30513) --- pkg/security/secl/model/model.go | 1 + pkg/security/seclwin/model/model.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/security/secl/model/model.go b/pkg/security/secl/model/model.go index e438c1b0d8ec7..e4b793c840f43 100644 --- a/pkg/security/secl/model/model.go +++ b/pkg/security/secl/model/model.go @@ -440,6 +440,7 @@ func (pc *ProcessCacheEntry) IsContainerRoot() bool { func (pc *ProcessCacheEntry) Reset() { pc.ProcessContext = zeroProcessContext pc.refCount = 0 + pc.onRelease = nil } // Retain increment ref counter diff --git a/pkg/security/seclwin/model/model.go b/pkg/security/seclwin/model/model.go index e438c1b0d8ec7..e4b793c840f43 100644 --- a/pkg/security/seclwin/model/model.go +++ b/pkg/security/seclwin/model/model.go @@ -440,6 +440,7 @@ func (pc *ProcessCacheEntry) IsContainerRoot() bool { func (pc *ProcessCacheEntry) Reset() { pc.ProcessContext = zeroProcessContext pc.refCount = 0 + pc.onRelease = nil } // Retain increment ref counter