Skip to content

Commit a76c4fb

Browse files
author
shi yixue
committed
modified the dereference null pointer value.
Signed-off-by: shi yixue <[email protected]>
1 parent f719f96 commit a76c4fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

v2/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ func ToResources(spec *specs.LinuxResources) *Resources {
227227
if i := spec.Rdma; i != nil {
228228
resources.RDMA = &RDMA{}
229229
for device, value := range spec.Rdma {
230-
if device != "" && (value.HcaHandles != nil || value.HcaObjects != nil) {
230+
if device != "" && (value.HcaHandles != nil && value.HcaObjects != nil) {
231231
resources.RDMA.Limit = append(resources.RDMA.Limit, RDMAEntry{
232232
Device: device,
233233
HcaHandles: *value.HcaHandles,

0 commit comments

Comments
 (0)