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

Commit

Permalink
runtime: Add s.newStore.Destroy before defer
Browse files Browse the repository at this point in the history
Fixes: #2919
Signed-off-by: Shukui Yang <[email protected]>
(cherry picked from commit b44b1ba)
  • Loading branch information
keloyang authored and amshinde committed Nov 10, 2020
1 parent 44871d2 commit ebf5f95
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 ebf5f95

Please sign in to comment.