Merge pull request #697 from keloyang/destroy

runtime: Call s.newStore.Destroy if globalSandboxList.addSandbox
This commit is contained in:
Peng Tao 2020-09-27 16:30:24 +08:00 committed by GitHub
commit ac6f020c6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -513,6 +513,7 @@ func newSandbox(ctx context.Context, sandboxConfig SandboxConfig, factory Factor
} }
if err = globalSandboxList.addSandbox(s); err != nil { if err = globalSandboxList.addSandbox(s); err != nil {
s.newStore.Destroy(s.id)
return nil, err return nil, err
} }