projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9c7a42
)
libwinpr-utils/queue: fix a memory corruption in Queue_Clear.
author
Vic Lee
<llyzs@163.com>
Mon, 24 Dec 2012 04:45:55 +0000
(12:45 +0800)
committer
Vic Lee
<llyzs@163.com>
Mon, 24 Dec 2012 04:45:55 +0000
(12:45 +0800)
winpr/libwinpr/utils/collections/Queue.c
patch
|
blob
|
history
diff --git
a/winpr/libwinpr/utils/collections/Queue.c
b/winpr/libwinpr/utils/collections/Queue.c
index
279b848
..
2135ae5
100644
(file)
--- a/
winpr/libwinpr/utils/collections/Queue.c
+++ b/
winpr/libwinpr/utils/collections/Queue.c
@@
-85,7
+85,7
@@
void Queue_Clear(wQueue* queue)
if (queue->synchronized)
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)
queue->object.fnObjectFree(queue->array[index]);