Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2920 from keloyang/destroy
Browse files Browse the repository at this point in the history
Call s.newStore.Destroy if globalSandboxList.addSandbox failed
  • Loading branch information
amshinde authored Nov 9, 2020
2 parents dcd2dc3 + b44b1ba commit 687ff39
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions virtcontainers/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,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
}

Expand Down

0 comments on commit 687ff39

Please sign in to comment.