From 0d0fd95731913c0037e0cfdbb5a8572babcb3675 Mon Sep 17 00:00:00 2001 From: lifubang Date: Thu, 19 Mar 2026 15:36:02 +0000 Subject: [PATCH] libct: add a nil check for mountError Signed-off-by: lifubang --- libcontainer/mount_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainer/mount_linux.go b/libcontainer/mount_linux.go index 06df6cbbf..82ef0fdf1 100644 --- a/libcontainer/mount_linux.go +++ b/libcontainer/mount_linux.go @@ -110,7 +110,7 @@ func (e *mountError) Error() string { if e.source != "" { out += "src=" + e.source + ", " - if e.srcFile != nil { + if e.srcFile != nil && e.srcFile.file != nil { out += "srcType=" + string(e.srcFile.Type) + ", " out += "srcFd=" + strconv.Itoa(int(e.srcFile.file.Fd())) + ", " }