From: "Daniel P. Berrange" <berrange(a)redhat.com>
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 <berrange(a)redhat.com>
---
src/parallels/parallels_storage.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/parallels/parallels_storage.c b/src/parallels/parallels_storage.c
index 3e254ce..44246a7 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"));
--
1.8.3.1