mirror of https://gitee.com/openkylin/libvirt.git
vz: fix ref/unref of domain obj in vzDomainRevertToSnapshot
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
parent
8fe09a5317
commit
98c9c3048d
|
@ -2732,7 +2732,7 @@ vzDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags)
|
|||
|
||||
virCheckFlags(VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED, -1);
|
||||
|
||||
if (!(dom = vzDomObjFromDomain(snapshot->domain)))
|
||||
if (!(dom = vzDomObjFromDomainRef(snapshot->domain)))
|
||||
return -1;
|
||||
|
||||
if (virDomainRevertToSnapshotEnsureACL(snapshot->domain->conn, dom->def) < 0)
|
||||
|
|
Loading…
Reference in New Issue