mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-11 12:25:52 +00:00
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);
|
VIR_FREE(ctrl->devptmx);
|
||||||
|
|
||||||
virObjectUnref(ctrl->vm);
|
virDomainObjEndAPI(&ctrl->vm);
|
||||||
VIR_FREE(ctrl->name);
|
VIR_FREE(ctrl->name);
|
||||||
|
|
||||||
if (ctrl->timerShutdown != -1)
|
if (ctrl->timerShutdown != -1)
|
||||||
|
@ -96,7 +96,7 @@ testCompareStatusXMLToXMLFiles(const void *opaque)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(obj);
|
virDomainObjEndAPI(&obj);
|
||||||
VIR_FREE(actual);
|
VIR_FREE(actual);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user