From 3c860c40e309950cd4bc70be5497975103c6f858 Mon Sep 17 00:00:00 2001 From: Dmitry Guryanov Date: Wed, 26 Sep 2012 16:30:00 +0400 Subject: [PATCH] parallels: fix memory allocation size of videos array must be increased. Signed-off-by: Dmitry Guryanov (cherry picked from commit 9ca569dedff55451070be58362747cf6ea3d800d) --- src/parallels/parallels_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index 20ee361db0..87e8cf5247 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -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;