mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-20 11:35:19 +00: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 (cherry picked from commit 980f12be7221b07e569fed24b372ea00c52d9511)
This commit is contained in:
parent
30e02e12c1
commit
d070e1d1bc
@ -1710,6 +1710,9 @@ int virStoragePoolSourceFindDuplicate(virStoragePoolObjListPtr pools,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
virStoragePoolObjUnlock(pool);
|
virStoragePoolObjUnlock(pool);
|
||||||
|
|
||||||
|
if (matchpool)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matchpool) {
|
if (matchpool) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user