Skip to content

Commit

Permalink
Merge pull request #2822 from thaJeztah/keep_calm
Browse files Browse the repository at this point in the history
Prevent possible panic in cnmallocator.IsAttachmentAllocated()
  • Loading branch information
dperny committed Apr 12, 2019
2 parents 0c00829 + 97c654b commit 5f73a26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manager/allocator/cnmallocator/networkallocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ func (na *cnmNetworkAllocator) IsAttachmentAllocated(node *api.Node, networkAtta
return false
}

if networkAttachment == nil {
if networkAttachment == nil || networkAttachment.Network == nil {
return false
}

Expand Down

0 comments on commit 5f73a26

Please sign in to comment.