From f982c92c8fe24dadeb6f3cb1873a712945568b48 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Thu, 24 May 2018 10:56:09 -0400 Subject: [PATCH] conf: Use virDomainChrSourceDefClear() rather than VIR_FREE() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Berger Reviewed-by: Ján Tomko --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 371e48ca24..c1f2583c29 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -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);