diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 67555c9be3e98aa49ee10970e6af8f35c33c5c3b..c290baf953c95eb5a5843ccaca64cdf45ef77c23 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2853,6 +2853,7 @@ virDomainVideoDefClear(virDomainVideoDefPtr def) if (def->driver) VIR_FREE(def->driver->vhost_user_binary); VIR_FREE(def->driver); + virObjectUnref(def->privateData); memset(def, 0, sizeof(*def)); } @@ -2864,7 +2865,6 @@ void virDomainVideoDefFree(virDomainVideoDefPtr def) return; virDomainVideoDefClear(def); - virObjectUnref(def->privateData); VIR_FREE(def); }