mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
libnet/networkdb: fix nil-dereference panic in test
Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
@@ -108,7 +108,10 @@ func (db *NetworkDB) verifyNetworkExistence(t *testing.T, node string, id string
|
||||
nn, nnok := db.networks[node]
|
||||
if nnok {
|
||||
n, ok := nn[id]
|
||||
leaving := n.leaving
|
||||
var leaving bool
|
||||
if ok {
|
||||
leaving = n.leaving
|
||||
}
|
||||
db.RUnlock()
|
||||
if present && ok {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user