Skip to content

Commit

Permalink
Merge pull request #523 from q384566678/runtimetest-panic
Browse files Browse the repository at this point in the history
runtimetest: fix nil dereference
  • Loading branch information
liangchenye authored Nov 28, 2017
2 parents 7ebf1b1 + ca332ae commit 25d9b8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/runtimetest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ func validatePosixUser(spec *rspec.Spec) error {
}

func validateProcess(spec *rspec.Spec) error {
if spec.Process == nil {
return nil
}

if spec.Process.Cwd != "" {
cwd, err := os.Getwd()
if err != nil {
Expand Down

0 comments on commit 25d9b8d

Please sign in to comment.