Skip to content

Commit d0a19ee

Browse files
committed
prevent nil pointers when setting vsock id parameter
Signed-off-by: Jerome Gravel-Niquet <[email protected]>
1 parent 5e56d92 commit d0a19ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

firecracker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ type PutGuestVsockByIDOpt func(*ops.PutGuestVsockByIDParams)
192192
func (f *Client) PutGuestVsockByID(ctx context.Context, vsock *models.Vsock, opts ...PutGuestVsockByIDOpt) (*ops.PutGuestVsockByIDNoContent, error) {
193193
params := ops.NewPutGuestVsockByIDParams()
194194
params.SetContext(ctx)
195-
params.ID = *vsock.VsockID
195+
params.SetID(StringValue(vsock.VsockID))
196196
params.SetBody(vsock)
197197
for _, opt := range opts {
198198
opt(params)

0 commit comments

Comments
 (0)