While looking for something else, I noticed that there were only 2 callers to virDomainNetDefClear(), and one of those was virDomain NetDefFree(). virDomainNetDefClear() necessarily has a lot of VIR_FREE() in it that couldn't be changed to g_free() (because it's possible the object will be used after it is cleared). This series eliminates the actual practical usage of virDomainNetDefClear() by just creating a new object instead of clearing and re-using the old object, then moves the contents of virDomainNetDefClear() into virDomainNetDefFree(), and finally changes all the uses of VIR_FREE() to g_free() (now that it's safe to do so). Laine Stump (3): qemu: eliminate use of virDomainNetDefClear() in qemuConnectDomainXMLToNative() conf: eliminate virDomainNetDefClear() conf: use g_free() instead of VIR_FREE in virDomainNetDefFree() src/conf/domain_conf.c | 51 +++++++++++++++++----------------------- src/conf/domain_conf.h | 1 - src/libvirt_private.syms | 1 - src/qemu/qemu_driver.c | 26 +++++++++----------- 4 files changed, 33 insertions(+), 46 deletions(-) -- 2.26.2