mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
util: rename virStorageEncryptionInfoDefFree()
usually a function call vir*Free() will take a single pointer to an object as its argument, and will then free all resources associated with that object, including the object itself. virStorageEnctyptionInfoDefFree() doesn't do that - it frees all the subordinate resources of the ojbect, but doesn't free the object itself; usually a function like that is called vir*Clear(). Let's rename this function to not be misleading. Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
2adfd26ec9
commit
45b2912c71
@ -48,7 +48,7 @@ VIR_ENUM_IMPL(virStorageEncryptionFormat,
|
||||
);
|
||||
|
||||
static void
|
||||
virStorageEncryptionInfoDefFree(virStorageEncryptionInfoDefPtr def)
|
||||
virStorageEncryptionInfoDefClear(virStorageEncryptionInfoDefPtr def)
|
||||
{
|
||||
VIR_FREE(def->cipher_name);
|
||||
VIR_FREE(def->cipher_mode);
|
||||
@ -77,7 +77,7 @@ virStorageEncryptionFree(virStorageEncryptionPtr enc)
|
||||
|
||||
for (i = 0; i < enc->nsecrets; i++)
|
||||
virStorageEncryptionSecretFree(enc->secrets[i]);
|
||||
virStorageEncryptionInfoDefFree(&enc->encinfo);
|
||||
virStorageEncryptionInfoDefClear(&enc->encinfo);
|
||||
VIR_FREE(enc->secrets);
|
||||
VIR_FREE(enc);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user