testutilsxen: error out on initialization failure

libxlDriverConfigNew can possibly fail on wrong
firmware values (unlikely) or on failure to create
the log directory (possible if you're debugging
tests with VIR_FILE_ACCESS)

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: 4a4132b462
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
Ján Tomko 2020-02-22 12:44:45 +01:00
parent f16663d58f
commit 43773d48e6
1 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,8 @@ libxlDriverPrivatePtr testXLInitDriver(void)
return NULL;
}
driver->config = libxlDriverConfigNew();
if (!(driver->config = libxlDriverConfigNew()))
return NULL;
driver->config->caps = testXLInitCaps();