mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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->vram = virDomainVideoDefaultRAM(def, video->type);
|
||||||
video->heads = 1;
|
video->heads = 1;
|
||||||
if (VIR_ALLOC_N(def->videos, 1) < 0)
|
if (VIR_APPEND_ELEMENT(def->videos, def->nvideos, video) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
def->videos[def->nvideos++] = video;
|
|
||||||
video = NULL;
|
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
Reference in New Issue
Block a user