Skip to content

Commit

Permalink
Do not segfault on hard stop
Browse files Browse the repository at this point in the history
Podman machine on MAC can segfault on hard stop.

Fixes: 23654

Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed Aug 19, 2024
1 parent 7899358 commit fc30620
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 fc30620

Please sign in to comment.