mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-01 20:05:19 +00:00
hyperv: use g_autoptr for Msvm_DiskDrive in hypervDomainDefParsePhysicalDisk
Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
d6d523e6cf
commit
51080a21f5
@ -1101,7 +1101,7 @@ hypervDomainDefParsePhysicalDisk(hypervPrivate *priv,
|
||||
{
|
||||
int result = -1;
|
||||
Msvm_ResourceAllocationSettingData *controller = NULL;
|
||||
Msvm_DiskDrive *diskdrive = NULL;
|
||||
g_autoptr(Msvm_DiskDrive) diskdrive = NULL;
|
||||
virDomainDiskDefPtr disk = NULL;
|
||||
char **hostResource = entry->data->HostResource.data;
|
||||
g_autofree char *hostEscaped = NULL;
|
||||
@ -1188,7 +1188,6 @@ hypervDomainDefParsePhysicalDisk(hypervPrivate *priv,
|
||||
cleanup:
|
||||
if (result != 0 && disk)
|
||||
virDomainDiskDefFree(disk);
|
||||
hypervFreeObject((hypervObject *)diskdrive);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user