]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: net: Fix helper for applying new network definition
authorPeter Krempa <pkrempa@redhat.com>
Thu, 25 Oct 2012 15:06:04 +0000 (17:06 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 2 Nov 2012 12:28:39 +0000 (13:28 +0100)
When there's no new definition the helper overwrote the old one with
NULL.

src/conf/network_conf.c

index a55339d3a596eeac13d4bfe5dcc8a8742c77df47..d16b705928525531c96402ecf945ae6484c990d7 100644 (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;