提交 d460558e 编写于 作者: J Ján Tomko 提交者: Cole Robinson

conf: use VIR_APPEND_ELEMENT in virDomainDefAddImplicitVideo

(cherry picked from commit 12786889)
上级 24cf4c64
......@@ -18585,10 +18585,8 @@ virDomainDefAddImplicitVideo(virDomainDefPtr def)
}
video->vram = virDomainVideoDefaultRAM(def, video->type);
video->heads = 1;
if (VIR_ALLOC_N(def->videos, 1) < 0)
if (VIR_APPEND_ELEMENT(def->videos, def->nvideos, video) < 0)
goto cleanup;
def->videos[def->nvideos++] = video;
video = NULL;
ret = 0;
cleanup:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册