Commit id d8e8b63d introduced the test, but neglected to check for error from virTestLoadFile in testCompareXMLToDomConfig. Found by Coverity Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- tests/libxlxml2domconfigtest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/libxlxml2domconfigtest.c b/tests/libxlxml2domconfigtest.c index 0d2a7385e5..54a92cc959 100644 --- a/tests/libxlxml2domconfigtest.c +++ b/tests/libxlxml2domconfigtest.c @@ -104,7 +104,9 @@ testCompareXMLToDomConfig(const char *xmlfile, goto cleanup; } - virTestLoadFile(jsonfile, &tempjson); + if (virTestLoadFile(jsonfile, &tempjson) < 0) + goto cleanup; + if (libxl_domain_config_from_json(cfg->ctx, &expectconfig, tempjson) != 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", "Failed to create libxl_domain_config from JSON doc"); -- 2.14.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list