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:
parent
7c91cb2282
commit
10b3c0731c
@ -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"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user