conf: Fix virDomainObjParseFile object handling

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@redhat.com>
This commit is contained in:
John Ferlan 2018-03-26 18:21:59 -04:00
parent c534d10ffe
commit d4aaa1651b
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -96,7 +96,7 @@ testCompareStatusXMLToXMLFiles(const void *opaque)
ret = 0;
cleanup:
virObjectUnref(obj);
virDomainObjEndAPI(&obj);
VIR_FREE(actual);
return ret;
}