mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
util: storagefile: Introduce helper to free storage source perms
It will also be reused later.
This commit is contained in:
parent
89939e1301
commit
5aadf43750
@ -1451,6 +1451,17 @@ virStorageNetHostDefFree(size_t nhosts,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
virStoragePermsFree(virStoragePermsPtr def)
|
||||
{
|
||||
if (!def)
|
||||
return;
|
||||
|
||||
VIR_FREE(def->label);
|
||||
VIR_FREE(def);
|
||||
}
|
||||
|
||||
|
||||
virStorageNetHostDefPtr
|
||||
virStorageNetHostDefCopy(size_t nhosts,
|
||||
virStorageNetHostDefPtr hosts)
|
||||
@ -1564,10 +1575,7 @@ virStorageSourceClear(virStorageSourcePtr def)
|
||||
virSecurityDeviceLabelDefFree(def->seclabels[i]);
|
||||
VIR_FREE(def->seclabels);
|
||||
}
|
||||
if (def->perms) {
|
||||
VIR_FREE(def->perms->label);
|
||||
VIR_FREE(def->perms);
|
||||
}
|
||||
virStoragePermsFree(def->perms);
|
||||
VIR_FREE(def->timestamps);
|
||||
|
||||
virStorageNetHostDefFree(def->nhosts, def->hosts);
|
||||
|
Loading…
Reference in New Issue
Block a user