Skip to content

Commit

Permalink
Merge pull request #218 from xuegege5290/main
Browse files Browse the repository at this point in the history
modified the dereference null pointer value.
  • Loading branch information
estesp authored Mar 1, 2022
2 parents e96fc8e + a76c4fb commit d5e6fc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v2/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func ToResources(spec *specs.LinuxResources) *Resources {
if i := spec.Rdma; i != nil {
resources.RDMA = &RDMA{}
for device, value := range spec.Rdma {
if device != "" && (value.HcaHandles != nil || value.HcaObjects != nil) {
if device != "" && (value.HcaHandles != nil && value.HcaObjects != nil) {
resources.RDMA.Limit = append(resources.RDMA.Limit, RDMAEntry{
Device: device,
HcaHandles: *value.HcaHandles,
Expand Down

0 comments on commit d5e6fc3

Please sign in to comment.