提交 3c860c40 编写于 作者: D Dmitry Guryanov 提交者: Cole Robinson

parallels: fix memory allocation

size of videos array must be increased.
Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
(cherry picked from commit 9ca569de)
上级 a8ad9396
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册