mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
c534d10ffe
commit
d4aaa1651b
|
@ -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)
|
||||
|
|
|
@ -96,7 +96,7 @@ testCompareStatusXMLToXMLFiles(const void *opaque)
|
|||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
virObjectUnref(obj);
|
||||
virDomainObjEndAPI(&obj);
|
||||
VIR_FREE(actual);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue