Skip to content

Commit

Permalink
Return empty DevicePluginOptions instead of nil (patch by @drdelayi…
Browse files Browse the repository at this point in the history
…smysenpai)

Fixes a segfault on x86_64/amd64.
  • Loading branch information
jpc committed Jan 17, 2023
1 parent f654859 commit 60bb731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion socketcan.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (scdp *VCANDevicePlugin) Allocate(ctx context.Context, r *pluginapi.Allocat
// GetDevicePluginOptions returns options to be communicated with Device
// Manager.
func (VCANDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error) {
return nil, nil
return &pluginapi.DevicePluginOptions{}, nil
}

// PreStartContainer is called, if indicated by Device Plugin during registeration phase,
Expand Down

0 comments on commit 60bb731

Please sign in to comment.