Avoid duplicate calls to runner#destroy

Signed-off-by: Ted Yu <yuzhihong@gmail.com>
This commit is contained in:
Ted Yu 2020-03-23 09:04:38 -07:00
parent 939cd0b734
commit 0a7762c664
1 changed files with 3 additions and 1 deletions

View File

@ -349,7 +349,9 @@ func (r *runner) run(config *specs.Process) (int, error) {
if detach { if detach {
return 0, nil return 0, nil
} }
r.destroy() if err == nil {
r.destroy()
}
return status, err return status, err
} }