mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
conf: use VIR_APPEND_ELEMENT in virDomainDefAddImplicitVideo
This commit is contained in:
parent
1485be1784
commit
1278688921
@ -18663,10 +18663,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:
|
||||
|
Loading…
Reference in New Issue
Block a user