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:
Kai Qiang Wu(Kennan)
2016-06-08 14:36:47 +00:00
parent 5b4a1181e1
commit 9eb8ea5219
2 changed files with 29 additions and 3 deletions
@@ -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)
}
}