[PATCH 5/6] qemu: domain: Fix names for functions that clear security info

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

 



They don't free the structure itself so they should be called *Clear
rather than *Free.
---
 src/qemu/qemu_domain.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 87f0dbd..7e741a7 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -728,7 +728,7 @@ qemuDomainMasterKeyCreate(virDomainObjPtr vm)


 static void
-qemuDomainSecretPlainFree(qemuDomainSecretPlain secret)
+qemuDomainSecretPlainClear(qemuDomainSecretPlain secret)
 {
     VIR_FREE(secret.username);
     memset(secret.secret, 0, strlen(secret.secret));
@@ -737,7 +737,7 @@ qemuDomainSecretPlainFree(qemuDomainSecretPlain secret)


 static void
-qemuDomainSecretAESFree(qemuDomainSecretAES secret)
+qemuDomainSecretAESClear(qemuDomainSecretAES secret)
 {
     VIR_FREE(secret.username);
     VIR_FREE(secret.alias);
@@ -754,11 +754,11 @@ qemuDomainSecretInfoFree(qemuDomainSecretInfoPtr *secinfo)

     switch ((qemuDomainSecretInfoType) (*secinfo)->type) {
     case VIR_DOMAIN_SECRET_INFO_TYPE_PLAIN:
-        qemuDomainSecretPlainFree((*secinfo)->s.plain);
+        qemuDomainSecretPlainClear((*secinfo)->s.plain);
         break;

     case VIR_DOMAIN_SECRET_INFO_TYPE_AES:
-        qemuDomainSecretAESFree((*secinfo)->s.aes);
+        qemuDomainSecretAESClear((*secinfo)->s.aes);
         break;

     case VIR_DOMAIN_SECRET_INFO_TYPE_LAST:
-- 
2.8.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]