]> git.ipfire.org Git - thirdparty/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)
committerCole Robinson <crobinso@redhat.com>
Sun, 9 Dec 2012 21:20:52 +0000 (16:20 -0500)
When there's no new definition the helper overwrote the old one with
NULL.
(cherry picked from commit 947230fb56325c86d318215a3e6c9cdb379dc966)

src/conf/network_conf.c

index 9187de1660ea4a2253ee42c0fdec058ae51ae537..a7b297a6a08b8805a2140532be4ac5bb55f34dea 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;