mirror of
https://github.com/containers/podman.git
synced 2025-10-25 02:04:43 +08:00
Merge pull request #9235 from Luap99/fix-9234
Fix podman network disconnect wrong NetworkStatus number
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user