1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-26 03:21:44 +03:00

storage: Break out the loop if duplicate pool is found

It doesn't break out the "for" loop even if duplicate pool is
found, and thus the "matchpool" could be overriden as NULL again
if there is different pool afterwards.

To address the problem in libvirt-user list:

https://www.redhat.com/archives/libvirt-users/2012-April/msg00150.html
This commit is contained in:
Osier Yang 2012-04-28 16:18:44 +08:00
parent 122fa379de
commit 980f12be72

View File

@ -1736,6 +1736,9 @@ int virStoragePoolSourceFindDuplicate(virStoragePoolObjListPtr pools,
break;
}
virStoragePoolObjUnlock(pool);
if (matchpool)
break;
}
if (matchpool) {