[PATCH] conf: fix forget restore ctxt->node when parse memory device success

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1223631

When set a memory device in the xml, <sysinfo> in xml will be lost.
Because we forgot restore ctxt->node to the oldnode after parse memory
device, this will make the parse function after virDomainMemoryDefParseXML
cannot find a node they need when parse a full xml(virDomainDefParseXML).

Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index bfdc94e..7ddc1ea 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -11828,6 +11828,7 @@ virDomainMemoryDefParseXML(xmlNodePtr memdevNode,
     if (virDomainDeviceInfoParseXML(memdevNode, NULL, &def->info, flags) < 0)
         goto error;
 
+    ctxt->node = save;
     return def;
 
  error:
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]