mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
parallels: fix memory allocation
size of videos array must be increased. Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
This commit is contained in:
parent
ac1c77f04d
commit
9ca569dedf
@ -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…
x
Reference in New Issue
Block a user