提交 aef96949 编写于 作者: M Matthias Bolte

qemu: Don't allocate zero bytes

上级 21c84e00
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册