mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
runtime: Call s.newStore.Destroy if globalSandboxList.addSandbox
Fixes: #696 Signed-off-by: Shukui Yang <keloyangsk@gmail.com>
This commit is contained in:
parent
8667df4d09
commit
3523167d20
@ -513,6 +513,7 @@ func newSandbox(ctx context.Context, sandboxConfig SandboxConfig, factory Factor
|
||||
}
|
||||
|
||||
if err = globalSandboxList.addSandbox(s); err != nil {
|
||||
s.newStore.Destroy(s.id)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user