Skip to content

Commit

Permalink
Merge pull request opencontainers#522 from q384566678/validate-rootpath
Browse files Browse the repository at this point in the history
validate: fix nil deference
  • Loading branch information
Ma Shimiao authored Nov 21, 2017
2 parents 801ab0c + cdf38ca commit 8e3ecf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ func (v *Validator) CheckProcess() (errs error) {
fmt.Errorf("args must not be empty"),
rspec.Version))
} else {
if filepath.IsAbs(process.Args[0]) {
if filepath.IsAbs(process.Args[0]) && v.spec.Root != nil {
var rootfsPath string
if filepath.IsAbs(v.spec.Root.Path) {
rootfsPath = v.spec.Root.Path
Expand Down

0 comments on commit 8e3ecf4

Please sign in to comment.