1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

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 <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2013-09-03 16:23:42 +01:00
parent 7c91cb2282
commit 10b3c0731c

View File

@ -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"));