mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct: add a nil check for mountError
Signed-off-by: lifubang <lifubang@acmcoder.com>
(cherry picked from commit 0d0fd95731)
Signed-off-by: lifubang <lifubang@acmcoder.com>
This commit is contained in:
@@ -110,7 +110,7 @@ func (e *mountError) Error() string {
|
|||||||
|
|
||||||
if e.source != "" {
|
if e.source != "" {
|
||||||
out += "src=" + 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 += "srcType=" + string(e.srcFile.Type) + ", "
|
||||||
out += "srcFd=" + strconv.Itoa(int(e.srcFile.file.Fd())) + ", "
|
out += "srcFd=" + strconv.Itoa(int(e.srcFile.file.Fd())) + ", "
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user