[libvirt] [PATCH v1 03/31] testNetworkUpdate: Unlock network at the end

Michal Privoznik mprivozn at redhat.com
Thu Feb 26 14:17:12 UTC 2015


Silly this bug went unnoticed so long. At the beginning we try to
find the passed network in the list of network objects. If found,
it's locked and real work takes place. Then, in the end, the
network object is never unlocked.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/test/test_driver.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index a386270..2bed3f2 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -3835,6 +3835,8 @@ testNetworkUpdate(virNetworkPtr net,
 
     ret = 0;
  cleanup:
+    if (network)
+        virNetworkObjUnlock(network);
     testDriverUnlock(privconn);
     return ret;
 }
-- 
2.0.5




More information about the libvir-list mailing list