[PATCH 7/8] util: rename virStorageEncryptionInfoDefFree()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/conf/storage_encryption_conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/storage_encryption_conf.c b/src/conf/storage_encryption_conf.c
index 34ad5dffeb..6a32df15b7 100644
--- a/src/conf/storage_encryption_conf.c
+++ b/src/conf/storage_encryption_conf.c
@@ -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);
 }
-- 
2.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux