When virDomainObjParseFile runs, it returns a locked @obj with
one reference. Rather than just use virObjectUnref to clean that
up, use virObjectEndAPI.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/lxc/lxc_controller.c | 2 +-
tests/qemuxml2xmltest.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 59609b0a0..507bffda0 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -284,7 +284,7 @@ static void virLXCControllerFree(virLXCControllerPtr ctrl)
VIR_FREE(ctrl->devptmx);
- virObjectUnref(ctrl->vm);
+ virDomainObjEndAPI(&ctrl->vm);
VIR_FREE(ctrl->name);
if (ctrl->timerShutdown != -1)
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 0f560290a..ead4be873 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -96,7 +96,7 @@ testCompareStatusXMLToXMLFiles(const void *opaque)
ret = 0;
cleanup:
- virObjectUnref(obj);
+ virDomainObjEndAPI(&obj);
VIR_FREE(actual);
return ret;
}
--
2.13.6