mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-27 18:03:50 +03:00
conf: Rename virDomainDiskHostDefFree to virDomainDiskHostDefClear
The function destroys only the contents not the object itself thus it should be called Clear.
This commit is contained in:
parent
16bc786408
commit
2b2decbdcc
@ -1217,13 +1217,13 @@ void virDomainDiskDefFree(virDomainDiskDefPtr def)
|
||||
}
|
||||
|
||||
for (i = 0; i < def->nhosts; i++)
|
||||
virDomainDiskHostDefFree(&def->hosts[i]);
|
||||
virDomainDiskHostDefClear(&def->hosts[i]);
|
||||
VIR_FREE(def->hosts);
|
||||
|
||||
VIR_FREE(def);
|
||||
}
|
||||
|
||||
void virDomainDiskHostDefFree(virDomainDiskHostDefPtr def)
|
||||
void virDomainDiskHostDefClear(virDomainDiskHostDefPtr def)
|
||||
{
|
||||
if (!def)
|
||||
return;
|
||||
@ -4864,7 +4864,7 @@ error:
|
||||
VIR_FREE(protocol);
|
||||
VIR_FREE(transport);
|
||||
while (nhosts > 0) {
|
||||
virDomainDiskHostDefFree(&hosts[nhosts - 1]);
|
||||
virDomainDiskHostDefClear(&hosts[nhosts - 1]);
|
||||
nhosts--;
|
||||
}
|
||||
|
||||
|
@ -2209,7 +2209,7 @@ void virDomainGraphicsDefFree(virDomainGraphicsDefPtr def);
|
||||
void virDomainInputDefFree(virDomainInputDefPtr def);
|
||||
void virDomainDiskDefFree(virDomainDiskDefPtr def);
|
||||
void virDomainLeaseDefFree(virDomainLeaseDefPtr def);
|
||||
void virDomainDiskHostDefFree(virDomainDiskHostDefPtr def);
|
||||
void virDomainDiskHostDefClear(virDomainDiskHostDefPtr def);
|
||||
int virDomainDeviceFindControllerModel(virDomainDefPtr def,
|
||||
virDomainDeviceInfoPtr info,
|
||||
int controllerType);
|
||||
|
@ -197,7 +197,7 @@ virDomainDiskErrorPolicyTypeToString;
|
||||
virDomainDiskFindByBusAndDst;
|
||||
virDomainDiskGeometryTransTypeFromString;
|
||||
virDomainDiskGeometryTransTypeToString;
|
||||
virDomainDiskHostDefFree;
|
||||
virDomainDiskHostDefClear;
|
||||
virDomainDiskIndexByName;
|
||||
virDomainDiskInsert;
|
||||
virDomainDiskInsertPreAlloced;
|
||||
|
@ -3517,7 +3517,7 @@ cleanup:
|
||||
return ret;
|
||||
|
||||
error:
|
||||
virDomainDiskHostDefFree(def->hosts);
|
||||
virDomainDiskHostDefClear(def->hosts);
|
||||
VIR_FREE(def->hosts);
|
||||
goto cleanup;
|
||||
}
|
||||
@ -3619,7 +3619,7 @@ qemuParseNBDString(virDomainDiskDefPtr disk)
|
||||
return 0;
|
||||
|
||||
error:
|
||||
virDomainDiskHostDefFree(h);
|
||||
virDomainDiskHostDefClear(h);
|
||||
VIR_FREE(h);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user