提交 50ee3e03 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 4b744d7d
...@@ -84,16 +84,19 @@ testCompareXMLToXMLHelper(const void *data) ...@@ -84,16 +84,19 @@ testCompareXMLToXMLHelper(const void *data)
abs_srcdir, info->name) < 0) abs_srcdir, info->name) < 0)
goto cleanup; goto cleanup;
if (info->when & WHEN_INACTIVE) { if ((info->when & WHEN_INACTIVE) &&
ret = testCompareXMLToXMLFiles(xml_in, testCompareXMLToXMLFiles(xml_in,
info->different ? xml_out : xml_in, info->different ? xml_out : xml_in,
false); false) < 0)
} goto cleanup;
if (info->when & WHEN_ACTIVE) {
ret = testCompareXMLToXMLFiles(xml_in, if ((info->when & WHEN_ACTIVE) &&
testCompareXMLToXMLFiles(xml_in,
info->different ? xml_out : xml_in, info->different ? xml_out : xml_in,
true); true) < 0)
} goto cleanup;
ret = 0;
cleanup: cleanup:
VIR_FREE(xml_in); VIR_FREE(xml_in);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册