mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
libvirtd: avoid false-positive NULL-deref warning from clang
* daemon/libvirtd.c (qemudWorker): Rewrite loop to silence a warning.
This commit is contained in:
parent
e749d77619
commit
66d70a8f66
@ -1502,15 +1502,14 @@ static void *qemudWorker(void *data)
|
|||||||
struct qemud_client_message *msg;
|
struct qemud_client_message *msg;
|
||||||
|
|
||||||
virMutexLock(&server->lock);
|
virMutexLock(&server->lock);
|
||||||
while (((client = qemudPendingJob(server)) == NULL) &&
|
while ((client = qemudPendingJob(server)) == NULL) {
|
||||||
!worker->quitRequest) {
|
if (worker->quitRequest ||
|
||||||
if (virCondWait(&server->job, &server->lock) < 0) {
|
virCondWait(&server->job, &server->lock) < 0) {
|
||||||
virMutexUnlock(&server->lock);
|
virMutexUnlock(&server->lock);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (worker->quitRequest) {
|
if (worker->quitRequest) {
|
||||||
if (client)
|
|
||||||
virMutexUnlock(&client->lock);
|
virMutexUnlock(&client->lock);
|
||||||
virMutexUnlock(&server->lock);
|
virMutexUnlock(&server->lock);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user