From: Peter Krempa Date: Fri, 26 Oct 2012 12:33:13 +0000 (+0200) Subject: conf: net: Fix deadlock if assignment of network def fails X-Git-Tag: CVE-2012-3411~184 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8230891243f86e920d04a0751512cc31055ff8c;p=thirdparty%2Flibvirt.git conf: net: Fix deadlock if assignment of network def fails When the assignment fails, the network object is not unlocked and next call that would use it deadlocks. --- diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index d16b705928..7bd7ba9db2 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -295,6 +295,7 @@ virNetworkAssignDef(virNetworkObjListPtr nets, if ((network = virNetworkFindByName(nets, def->name))) { if (virNetworkObjAssignDef(network, def, live) < 0) { + virNetworkObjUnlock(network); return NULL; } return network;