diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c3214dc4f352e7fac05ac39b16f4b013c4aa493d..c7cc830c1d576ab699d5596cf373dc1c4452e015 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -16458,7 +16458,7 @@ virDomainVsockDefParseXML(virDomainXMLOptionPtr xmlopt, xmlNodePtr cid; int val; g_autofree char *tmp = NULL; - g_autofree virDomainVsockDefPtr vsock = NULL; + g_autoptr(virDomainVsockDef) vsock = NULL; ctxt->node = node; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index c3acb29e6f000519f731c9d42e136d654d3c921b..2bd80c2fbf333e5bfddb326d6c2f308b2624a5e5 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2891,6 +2891,7 @@ void virDomainFSDefFree(virDomainFSDefPtr def); void virDomainActualNetDefFree(virDomainActualNetDefPtr def); virDomainVsockDefPtr virDomainVsockDefNew(virDomainXMLOptionPtr xmlopt); void virDomainVsockDefFree(virDomainVsockDefPtr vsock); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainVsockDef, virDomainVsockDefFree); void virDomainNetDefClear(virDomainNetDefPtr def); void virDomainNetDefFree(virDomainNetDefPtr def); void virDomainSmartcardDefFree(virDomainSmartcardDefPtr def);