qemu: domain: Fix names for functions that clear security info

They don't free the structure itself so they should be called *Clear
rather than *Free.
This commit is contained in:
Peter Krempa 2016-05-13 16:46:47 +02:00
parent 1cf5af40b9
commit fb1dddfb00

View File

@ -728,7 +728,7 @@ qemuDomainMasterKeyCreate(virDomainObjPtr vm)
static void static void
qemuDomainSecretPlainFree(qemuDomainSecretPlain secret) qemuDomainSecretPlainClear(qemuDomainSecretPlain secret)
{ {
VIR_FREE(secret.username); VIR_FREE(secret.username);
memset(secret.secret, 0, strlen(secret.secret)); memset(secret.secret, 0, strlen(secret.secret));
@ -737,7 +737,7 @@ qemuDomainSecretPlainFree(qemuDomainSecretPlain secret)
static void static void
qemuDomainSecretAESFree(qemuDomainSecretAES secret) qemuDomainSecretAESClear(qemuDomainSecretAES secret)
{ {
VIR_FREE(secret.username); VIR_FREE(secret.username);
VIR_FREE(secret.alias); VIR_FREE(secret.alias);
@ -754,11 +754,11 @@ qemuDomainSecretInfoFree(qemuDomainSecretInfoPtr *secinfo)
switch ((qemuDomainSecretInfoType) (*secinfo)->type) { switch ((qemuDomainSecretInfoType) (*secinfo)->type) {
case VIR_DOMAIN_SECRET_INFO_TYPE_PLAIN: case VIR_DOMAIN_SECRET_INFO_TYPE_PLAIN:
qemuDomainSecretPlainFree((*secinfo)->s.plain); qemuDomainSecretPlainClear((*secinfo)->s.plain);
break; break;
case VIR_DOMAIN_SECRET_INFO_TYPE_AES: case VIR_DOMAIN_SECRET_INFO_TYPE_AES:
qemuDomainSecretAESFree((*secinfo)->s.aes); qemuDomainSecretAESClear((*secinfo)->s.aes);
break; break;
case VIR_DOMAIN_SECRET_INFO_TYPE_LAST: case VIR_DOMAIN_SECRET_INFO_TYPE_LAST: