mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-26 07:34:04 +03:00
testsutilsqemu: check return value of virQEMUCapsNewCopy
While for virQEMUCapsNew this should not be needed (the possible failures in VIR_CLASS_NEW are only hit on bad API usage which we don't do here), virQEMUCapsNewCopy calls into many other functions, some of which actually fail. Check the return value of both. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
@@ -349,6 +349,9 @@ int qemuTestCapsCacheInsert(virFileCachePtr cache,
|
||||
tmpCaps = virQEMUCapsNew();
|
||||
}
|
||||
|
||||
if (!tmpCaps)
|
||||
return -1;
|
||||
|
||||
if (!virQEMUCapsHasMachines(tmpCaps)) {
|
||||
const char *defaultRAMid = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user