conf: net: Fix helper for applying new network definition

When there's no new definition the helper overwrote the old one with
NULL.
(cherry picked from commit 947230fb56)
This commit is contained in:
Peter Krempa 2012-10-25 17:06:04 +02:00 committed by Cole Robinson
parent 9a5430414d
commit 43995ddcc4

View File

@ -359,7 +359,7 @@ virNetworkObjSetDefTransient(virNetworkObjPtr network, bool live)
void
virNetworkObjUnsetDefTransient(virNetworkObjPtr network)
{
if (network->def) {
if (network->newDef) {
virNetworkDefFree(network->def);
network->def = network->newDef;
network->newDef = NULL;