diff --git a/winpr/libwinpr/utils/collections/MessageQueue.c b/winpr/libwinpr/utils/collections/MessageQueue.c index d49d2161f..c41c4736f 100644 --- a/winpr/libwinpr/utils/collections/MessageQueue.c +++ b/winpr/libwinpr/utils/collections/MessageQueue.c @@ -227,6 +227,8 @@ void MessageQueue_Free(wMessageQueue* queue) if (!queue) return; + MessageQueue_Clear(queue); + CloseHandle(queue->event); DeleteCriticalSection(&queue->lock);