From 6ce0e42741ad02ccb030eb2f89ca45c8e2f2e791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?okhowang=28=E7=8E=8B=E6=B2=9B=E6=96=87=29?= Date: Thu, 16 Apr 2026 16:50:13 +0800 Subject: [PATCH] fix: initProc null MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: okhowang(王沛文) --- handler/implementations/passThrough.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/handler/implementations/passThrough.go b/handler/implementations/passThrough.go index c9c3288..f1ac970 100644 --- a/handler/implementations/passThrough.go +++ b/handler/implementations/passThrough.go @@ -223,7 +223,8 @@ func (h *PassThrough) ReadWithNS( // read. That is, the handler's Read() method is normally invoked twice: the // first read returns X bytes, the second read returns 0 bytes. - if domain.ProcessNsMatch(process, cntr.InitProc()) { + initProc := cntr.InitProc() + if initProc != nil && domain.ProcessNsMatch(process, initProc) { cntr.Lock() @@ -309,7 +310,8 @@ func (h *PassThrough) WriteWithNS( // (not in inner containers or unshared namespaces) then cache the data. // See explanation in Read() method above. - if domain.ProcessNsMatch(process, cntr.InitProc()) { + initProc := cntr.InitProc() + if initProc != nil && domain.ProcessNsMatch(process, initProc) { if !req.NoCache { cntr.Lock() err = cntr.SetData(path, req.Offset, req.Data)