Fix possible infinite loop in remote driver

When we take out completed calls from queue we might end up
in circular pointer. We don't want pointer to previous item
point to element taken out.
This commit is contained in:
Michal Privoznik 2011-04-12 16:58:48 +02:00 committed by Eric Blake
parent 99fa30804b
commit 50e4b9195d

View File

@ -10672,8 +10672,9 @@ remoteIOEventLoop(virConnectPtr conn,
*/
VIR_DEBUG("Waking up sleep %d %p %p", tmp->proc_nr, tmp, priv->waitDispatch);
virCondSignal(&tmp->cond);
} else {
prev = tmp;
}
prev = tmp;
tmp = tmp->next;
}