Commit de7635a2 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

quartz: Avoid linked list walk with free next (Coverity).

parent 84bb5969
...@@ -116,12 +116,15 @@ static DWORD WINAPI SystemClockAdviseThread(LPVOID lpParam) { ...@@ -116,12 +116,15 @@ static DWORD WINAPI SystemClockAdviseThread(LPVOID lpParam) {
} }
/** First SingleShots Advice: sorted list */ /** First SingleShots Advice: sorted list */
for (it = This->pSingleShotAdvise; NULL != it && (it->rtBaseTime + it->rtIntervalTime) <= curTime; it = it->next) { it = This->pSingleShotAdvise;
while ((NULL != it) && (it->rtBaseTime + it->rtIntervalTime) <= curTime) {
SystemClockAdviseEntry* nextit = it->next;
/** send event ... */ /** send event ... */
SetEvent(it->hEvent); SetEvent(it->hEvent);
/** ... and Release it */ /** ... and Release it */
QUARTZ_RemoveAviseEntryFromQueue(This, it); QUARTZ_RemoveAviseEntryFromQueue(This, it);
CoTaskMemFree(it); CoTaskMemFree(it);
it = nextit;
} }
if (NULL != it) timeOut = (DWORD) ((it->rtBaseTime + it->rtIntervalTime) - curTime) / (REFERENCE_TIME)10000; if (NULL != it) timeOut = (DWORD) ((it->rtBaseTime + it->rtIntervalTime) - curTime) / (REFERENCE_TIME)10000;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment