mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
Don't clobber 'ret' variable in testCompareXMLToXMLHelper
The qemuxml2xmltest.c function testCompareXMLToXMLHelper would clobber the 'ret' variable causing it to mis-diagnose OOM errors. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
4b744d7d00
commit
50ee3e0357
@ -84,16 +84,19 @@ testCompareXMLToXMLHelper(const void *data)
|
||||
abs_srcdir, info->name) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (info->when & WHEN_INACTIVE) {
|
||||
ret = testCompareXMLToXMLFiles(xml_in,
|
||||
info->different ? xml_out : xml_in,
|
||||
false);
|
||||
}
|
||||
if (info->when & WHEN_ACTIVE) {
|
||||
ret = testCompareXMLToXMLFiles(xml_in,
|
||||
info->different ? xml_out : xml_in,
|
||||
true);
|
||||
}
|
||||
if ((info->when & WHEN_INACTIVE) &&
|
||||
testCompareXMLToXMLFiles(xml_in,
|
||||
info->different ? xml_out : xml_in,
|
||||
false) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if ((info->when & WHEN_ACTIVE) &&
|
||||
testCompareXMLToXMLFiles(xml_in,
|
||||
info->different ? xml_out : xml_in,
|
||||
true) < 0)
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(xml_in);
|
||||
|
Loading…
Reference in New Issue
Block a user