提交 980f12be 编写于 作者: O Osier Yang

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
上级 122fa379
......@@ -1736,6 +1736,9 @@ int virStoragePoolSourceFindDuplicate(virStoragePoolObjListPtr pools,
break;
}
virStoragePoolObjUnlock(pool);
if (matchpool)
break;
}
if (matchpool) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册