vz: fix ref/unref of domain obj in vzDomainRevertToSnapshot

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
Nikolay Shirokovskiy 2018-02-28 09:31:49 +03:00 committed by Michal Privoznik
parent 8fe09a5317
commit 98c9c3048d
1 changed files with 1 additions and 1 deletions

View File

@ -2732,7 +2732,7 @@ vzDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags)
virCheckFlags(VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED, -1); virCheckFlags(VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED, -1);
if (!(dom = vzDomObjFromDomain(snapshot->domain))) if (!(dom = vzDomObjFromDomainRef(snapshot->domain)))
return -1; return -1;
if (virDomainRevertToSnapshotEnsureACL(snapshot->domain->conn, dom->def) < 0) if (virDomainRevertToSnapshotEnsureACL(snapshot->domain->conn, dom->def) < 0)