conf: Use virDomainChrSourceDefClear() rather than VIR_FREE()

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Stefan Berger 2018-05-24 10:56:09 -04:00
parent ac23367c10
commit f982c92c8f

View File

@ -2645,7 +2645,7 @@ void virDomainTPMDefFree(virDomainTPMDefPtr def)
switch (def->type) {
case VIR_DOMAIN_TPM_TYPE_PASSTHROUGH:
VIR_FREE(def->data.passthrough.source.data.file.path);
virDomainChrSourceDefClear(&def->data.passthrough.source);
break;
case VIR_DOMAIN_TPM_TYPE_EMULATOR:
virDomainChrSourceDefClear(&def->data.emulator.source);