Skip to content

Commit

Permalink
Merge pull request #23666 from rhatdan/apple
Browse files Browse the repository at this point in the history
Do not segfault on hard stop
  • Loading branch information
openshift-merge-bot[bot] authored Aug 19, 2024
2 parents 7899358 + fc30620 commit 426aac3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/machine/apple/vfkit/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ func (vf *Helper) stateChange(newState rest.StateChange) error {
}
payload := bytes.NewReader(b)
serverResponse, err := vf.post(vf.Endpoint+state, payload)
_ = serverResponse.Body.Close()
if err == nil {
_ = serverResponse.Body.Close()
}
return err
}

Expand Down

0 comments on commit 426aac3

Please sign in to comment.