mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
util: unlock closeCallbacks if get callbacks for connect fail
Avoid return with the closeCallbacks locked when get callbacks list for connect fail. Signed-off-by: Wang King <king.wang@huawei.com> Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
980f2a35c7
commit
a563451e2b
@ -331,8 +331,10 @@ virCloseCallbacksRun(virCloseCallbacksPtr closeCallbacks,
|
||||
|
||||
virObjectLock(closeCallbacks);
|
||||
list = virCloseCallbacksGetForConn(closeCallbacks, conn);
|
||||
if (!list)
|
||||
if (!list) {
|
||||
virObjectLock(closeCallbacks);
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < list->nentries; i++) {
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||
|
Loading…
Reference in New Issue
Block a user