]> xenbits.xensource.com Git - libvirt.git/commitdiff
testNetworkUpdate: Unlock network at the end
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 25 Feb 2015 16:46:45 +0000 (17:46 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 4 Mar 2015 09:08:14 +0000 (10:08 +0100)
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@redhat.com>
src/test/test_driver.c

index 718e84aabd835da178e92c68d7c1291d4fae735a..2f55b5b2f0ff0ba9fcc3f11631c61d3ce0c77b28 100644 (file)
@@ -3835,6 +3835,8 @@ testNetworkUpdate(virNetworkPtr net,
 
     ret = 0;
  cleanup:
+    if (network)
+        virNetworkObjUnlock(network);
     testDriverUnlock(privconn);
     return ret;
 }