diff --git a/libcontainer/factory_linux.go b/libcontainer/factory_linux.go index 17b05a552..cd39ca38f 100644 --- a/libcontainer/factory_linux.go +++ b/libcontainer/factory_linux.go @@ -223,10 +223,9 @@ func StartInitialization() (err error) { defer func() { if e := recover(); e != nil { - if e, ok := e.(error); ok { - err = fmt.Errorf("panic from initialization: %w, %s", e, debug.Stack()) + if ee, ok := e.(error); ok { + err = fmt.Errorf("panic from initialization: %w, %s", ee, debug.Stack()) } else { - //nolint:errorlint // here e is not of error type err = fmt.Errorf("panic from initialization: %v, %s", e, debug.Stack()) } }