提交 fe89fd3b 编写于 作者: J Ján Tomko

Unlock the storage volume object after looking it up

Introduced by c930410b.

https://bugzilla.redhat.com/show_bug.cgi?id=980676
上级 4b91dc24
......@@ -1380,15 +1380,16 @@ storageVolLookupByKey(virConnectPtr conn,
virStorageVolDefFindByKey(driver->pools.objs[i], key);
if (vol) {
if (virStorageVolLookupByKeyEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0)
if (virStorageVolLookupByKeyEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0) {
virStoragePoolObjUnlock(driver->pools.objs[i]);
goto cleanup;
}
ret = virGetStorageVol(conn,
driver->pools.objs[i]->def->name,
vol->name,
vol->key,
NULL, NULL);
goto cleanup;
}
}
virStoragePoolObjUnlock(driver->pools.objs[i]);
......@@ -1440,15 +1441,16 @@ storageVolLookupByPath(virConnectPtr conn,
VIR_FREE(stable_path);
if (vol) {
if (virStorageVolLookupByPathEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0)
if (virStorageVolLookupByPathEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0) {
virStoragePoolObjUnlock(driver->pools.objs[i]);
goto cleanup;
}
ret = virGetStorageVol(conn,
driver->pools.objs[i]->def->name,
vol->name,
vol->key,
NULL, NULL);
goto cleanup;
}
}
virStoragePoolObjUnlock(driver->pools.objs[i]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册