mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-14 07:04:43 -05: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:
@@ -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--;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user