Fix wrong map usage
As map reference, if all networks use same, it could cause strange results. Closes: #23304 Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com> Upstream-commit: 1cac7e6cbd3d1501d0fc29fc55b7ada981974998 Component: engine
This commit is contained in:
@@ -732,10 +732,10 @@ func (daemon *Daemon) releaseNetwork(container *container.Container) {
|
||||
logrus.Errorf("Error deleting sandbox id %s for container %s: %v", sid, container.ID, err)
|
||||
}
|
||||
|
||||
attributes := map[string]string{
|
||||
"container": container.ID,
|
||||
}
|
||||
for _, nw := range networks {
|
||||
attributes := map[string]string{
|
||||
"container": container.ID,
|
||||
}
|
||||
daemon.LogNetworkEventWithAttributes(nw, "disconnect", attributes)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user