virStorageSourceChainHasManagedPR: Check propely

In the virStorageSourceChainHasManagedPR() function we iterate
over whole backing chain trying to determine if one of the layers
has managed PR configured. But due to a typo we in fact check the
top layer only.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2019-06-21 18:01:38 +02:00
parent c44022f616
commit c779da87ef

View File

@ -2083,7 +2083,7 @@ virStorageSourceChainHasManagedPR(virStorageSourcePtr src)
virStorageSourcePtr n;
for (n = src; virStorageSourceIsBacking(n); n = n->backingStore) {
if (virStoragePRDefIsManaged(src->pr))
if (virStoragePRDefIsManaged(n->pr))
return true;
}