mirror of https://github.com/FreeRDP/FreeRDP
libwinpr-utils/queue: fix a memory corruption in Queue_Clear.
This commit is contained in:
parent
b9c7a423bb
commit
48c0c4b090
|
@ -85,7 +85,7 @@ void Queue_Clear(wQueue* queue)
|
||||||
if (queue->synchronized)
|
if (queue->synchronized)
|
||||||
WaitForSingleObject(queue->mutex, INFINITE);
|
WaitForSingleObject(queue->mutex, INFINITE);
|
||||||
|
|
||||||
for (index = queue->head; index != queue->tail; index++)
|
for (index = queue->head; index != queue->tail; index = (index + 1) % queue->capacity)
|
||||||
{
|
{
|
||||||
if (queue->object.fnObjectFree)
|
if (queue->object.fnObjectFree)
|
||||||
queue->object.fnObjectFree(queue->array[index]);
|
queue->object.fnObjectFree(queue->array[index]);
|
||||||
|
|
Loading…
Reference in New Issue