Skip to content

Commit 8d20153

Browse files
Merge pull request #5062 from openshift-cherrypick-robot/cherry-pick-5060-to-release-1.21
[release-1.21] server: prevent segfault by not using a potentially nil sandbox
2 parents 30ca719 + 2a1d38d commit 8d20153

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/sandbox_stop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func (s *Server) StopPodSandbox(ctx context.Context, req *types.StopPodSandboxRe
2020
return err
2121
}
2222
if err == errSandboxNotCreated {
23-
return fmt.Errorf("StopPodSandbox failed as the sandbox is not created: %s", sb.ID())
23+
return fmt.Errorf("StopPodSandbox failed as the sandbox is not created: %s", req.PodSandboxID)
2424
}
2525

2626
// If the sandbox isn't found we just return an empty response to adhere

0 commit comments

Comments
 (0)