It will be more useful in there when calling from new places. Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> --- src/network/bridge_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index b16d524aa181..d27a7e9b88c4 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -2447,6 +2447,8 @@ networkShutdownNetwork(virNetworkDriverState *driver, return -1; } + virNetworkObjDeleteAllPorts(obj, cfg->stateDir); + /* now that we know it's stopped call the hook if present */ networkRunHook(obj, NULL, VIR_HOOK_NETWORK_OP_STOPPED, VIR_HOOK_SUBOP_END); @@ -3458,8 +3460,6 @@ networkDestroy(virNetworkPtr net) if ((ret = networkShutdownNetwork(driver, obj)) < 0) goto cleanup; - virNetworkObjDeleteAllPorts(obj, cfg->stateDir); - /* @def replaced in virNetworkObjUnsetDefTransient */ def = virNetworkObjGetDef(obj); -- 2.46.0