Skip to content

Commit cdf38ca

Browse files
author
Zhou Hao
committed
validate: fix nil deference
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
1 parent 8a6d284 commit cdf38ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

validate/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ func (v *Validator) CheckProcess() (errs error) {
334334
fmt.Errorf("args must not be empty"),
335335
rspec.Version))
336336
} else {
337-
if filepath.IsAbs(process.Args[0]) {
337+
if filepath.IsAbs(process.Args[0]) && v.spec.Root != nil {
338338
var rootfsPath string
339339
if filepath.IsAbs(v.spec.Root.Path) {
340340
rootfsPath = v.spec.Root.Path

0 commit comments

Comments
 (0)