mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
qemu: Don't allocate zero bytes
This commit is contained in:
parent
21c84e00d3
commit
aef969499f
@ -836,6 +836,8 @@ qemudCapsInitGuest(virCapsPtr caps,
|
||||
return -1;
|
||||
}
|
||||
|
||||
nmachines = 1;
|
||||
|
||||
if (VIR_ALLOC_N(machines, nmachines) < 0) {
|
||||
virReportOOMError(NULL);
|
||||
VIR_FREE(machine->name);
|
||||
@ -844,7 +846,6 @@ qemudCapsInitGuest(virCapsPtr caps,
|
||||
}
|
||||
|
||||
machines[0] = machine;
|
||||
nmachines = 1;
|
||||
} else {
|
||||
int probe = 1;
|
||||
if (old_caps && binary_mtime)
|
||||
|
Loading…
Reference in New Issue
Block a user