Skip to content

Commit

Permalink
modified the dereference null pointer value.
Browse files Browse the repository at this point in the history
Signed-off-by: shi yixue <shi.xue@zte.com.cn>
  • Loading branch information
shi yixue committed Jan 9, 2022
1 parent f719f96 commit a76c4fb
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 a76c4fb

Please sign in to comment.