Skip to content

Commit a970bf5

Browse files
committed
nil ref fix in container inspector
1 parent d3b7a36 commit a970bf5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/app/master/inspectors/container/container_inspector.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,11 @@ func (i *Inspector) setAvailablePorts(hostProbePorts map[dockerapi.Port][]docker
10941094
continue
10951095
}
10961096

1097+
if len(pbinding) == 0 {
1098+
i.logger.Debugf("setAvailablePorts: skipping empty port bindings => pk=%v", pk)
1099+
continue
1100+
}
1101+
10971102
i.AvailablePorts[pk] = pbinding[0]
10981103

10991104
portKeys, portList = addPorts(portKeys, portList, pk, pbinding)

0 commit comments

Comments
 (0)