mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-28 00:25:23 +00:00
parallels: fix memory allocation
size of videos array must be increased.
Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
(cherry picked from commit 9ca569dedf
)
This commit is contained in:
parent
a8ad93965f
commit
3c860c40e3
@ -277,7 +277,7 @@ parallelsAddVideoInfo(virDomainDefPtr def, virJSONValuePtr value)
|
||||
if (VIR_ALLOC(accel) < 0)
|
||||
goto no_memory;
|
||||
|
||||
if (VIR_REALLOC_N(def->videos, def->nvideos) < 0)
|
||||
if (VIR_REALLOC_N(def->videos, def->nvideos + 1) < 0)
|
||||
goto no_memory;
|
||||
|
||||
def->videos[def->nvideos++] = video;
|
||||
|
Loading…
Reference in New Issue
Block a user