In chConnectGetVersion() the CH driver is locked in order to read
driver->version. This is needless, because not only is the
version set with driver unlocked (chStateInitialize() calls
chExtractVersion() which sets the version), but the version is
practically immutable. Once driver initialized itself it's never
changed.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/ch/ch_driver.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c
index e751ddba19..7c3b45ca2f 100644
--- a/src/ch/ch_driver.c
+++ b/src/ch/ch_driver.c
@@ -106,9 +106,7 @@ static int chConnectGetVersion(virConnectPtr conn,
if (virConnectGetVersionEnsureACL(conn) < 0)
return -1;
- chDriverLock(driver);
*version = driver->version;
- chDriverUnlock(driver);
return 0;
}
--
2.34.1