mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-16 09:35:16 +00:00
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. (cherry picked from commit f8230891243f86e920d04a0751512cc31055ff8c)
This commit is contained in:
parent
43995ddcc4
commit
2d49ed5d18
@ -295,6 +295,7 @@ virNetworkAssignDef(virNetworkObjListPtr nets,
|
|||||||
|
|
||||||
if ((network = virNetworkFindByName(nets, def->name))) {
|
if ((network = virNetworkFindByName(nets, def->name))) {
|
||||||
if (virNetworkObjAssignDef(network, def, live) < 0) {
|
if (virNetworkObjAssignDef(network, def, live) < 0) {
|
||||||
|
virNetworkObjUnlock(network);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return network;
|
return network;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user