From: Peter Krempa Date: Thu, 25 Oct 2012 15:06:04 +0000 (+0200) Subject: conf: net: Fix helper for applying new network definition X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=947230fb56325c86d318215a3e6c9cdb379dc966;p=people%2Fdariof%2Flibvirt.git conf: net: Fix helper for applying new network definition When there's no new definition the helper overwrote the old one with NULL. --- diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index a55339d3a..d16b70592 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -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;