diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-04 16:34:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 16:34:45 -0500 |
commit | b1bd126cdab1c654570a49b13385a57b5d41f8fd (patch) | |
tree | 9eee72389842780f8133f28982ce0085c233fd30 /libpod | |
parent | e6e3520498500f6f81b1aa0a5b538c8069255376 (diff) | |
parent | 5c6ab3075e8fbf8fea7fbb5249189a0216400c41 (diff) | |
download | podman-b1bd126cdab1c654570a49b13385a57b5d41f8fd.tar.gz podman-b1bd126cdab1c654570a49b13385a57b5d41f8fd.tar.bz2 podman-b1bd126cdab1c654570a49b13385a57b5d41f8fd.zip |
Merge pull request #9235 from Luap99/fix-9234
Fix podman network disconnect wrong NetworkStatus number
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/networking_linux.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index 01e4102d1..55d338e7d 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -1180,7 +1180,7 @@ func (c *Container) NetworkDisconnect(nameOrID, netName string, force bool) erro // update network status if container is not running networkStatus := c.state.NetworkStatus // clip out the index of the network - tmpNetworkStatus := make([]*cnitypes.Result, len(networkStatus)-1) + tmpNetworkStatus := make([]*cnitypes.Result, 0, len(networkStatus)-1) for k, v := range networkStatus { if index != k { tmpNetworkStatus = append(tmpNetworkStatus, v) |