testNetworkUpdate: Unlock network at the end

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>
This commit is contained in:
Michal Privoznik 2015-02-25 17:46:45 +01:00
parent 7b8c12d8ce
commit 77ea6f7b0b

View File

@ -3835,6 +3835,8 @@ testNetworkUpdate(virNetworkPtr net,
ret = 0; ret = 0;
cleanup: cleanup:
if (network)
virNetworkObjUnlock(network);
testDriverUnlock(privconn); testDriverUnlock(privconn);
return ret; return ret;
} }