From: Daniel P. Berrange Date: Tue, 3 Sep 2013 15:23:42 +0000 (+0100) Subject: Don't call VIR_ALLOC on def->uuid in parallels storage driver X-Git-Tag: CVE-2013-4311~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10b3c0731cb3960c98b4da86cd0d4d9de4ed1656;p=thirdparty%2Flibvirt.git Don't call VIR_ALLOC on def->uuid in parallels storage driver The 'uuid' field in virDomainDefPtr is not a pointer, it is a fixed length array. Calling VIR_ALLOC on it is thus wrong and leaks memory. Signed-off-by: Daniel P. Berrange --- diff --git a/src/parallels/parallels_storage.c b/src/parallels/parallels_storage.c index 3e254ce8eb..44246a7b43 100644 --- a/src/parallels/parallels_storage.c +++ b/src/parallels/parallels_storage.c @@ -173,9 +173,6 @@ parallelsPoolCreateByPath(virConnectPtr conn, const char *path) if (!(def->name = parallelsMakePoolName(conn, path))) goto error; - if (VIR_ALLOC_N(def->uuid, VIR_UUID_BUFLEN)) - goto error; - if (virUUIDGenerate(def->uuid)) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Can't generate UUID"));