diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index a2d82d4326..ebc8061a2e 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -260,8 +260,9 @@ virNetworkObjAssignDef(virNetworkObjPtr network, return -1; } } else if (!live) { - virNetworkDefFree(network->newDef); /* should be unnecessary */ + virNetworkDefFree(network->newDef); virNetworkDefFree(network->def); + network->newDef = NULL; network->def = def; } else { virReportError(VIR_ERR_OPERATION_INVALID,