mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
service_linux: Fix null dereference in findLBEndpointSandbox
Signed-off-by: Scott Percival <scottp@lastyard.com>
This commit is contained in:
parent
20c88eb92f
commit
959dfca7e6
1 changed files with 4 additions and 3 deletions
|
@ -67,11 +67,12 @@ func (n *network) findLBEndpointSandbox() (*endpoint, *sandbox, error) {
|
|||
if !ok {
|
||||
return nil, nil, fmt.Errorf("Unable to get sandbox for %s(%s) in for %s", ep.Name(), ep.ID(), n.ID())
|
||||
}
|
||||
ep = sb.getEndpoint(ep.ID())
|
||||
if ep == nil {
|
||||
var sep *endpoint
|
||||
sep = sb.getEndpoint(ep.ID())
|
||||
if sep == nil {
|
||||
return nil, nil, fmt.Errorf("Load balancing endpoint %s(%s) removed from %s", ep.Name(), ep.ID(), n.ID())
|
||||
}
|
||||
return ep, sb, nil
|
||||
return sep, sb, nil
|
||||
}
|
||||
|
||||
// Searches the OS sandbox for the name of the endpoint interface
|
||||
|
|
Loading…
Add table
Reference in a new issue