From 855dc9abafb9256a90f6a1eaaded09dac181a738 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Fri, 9 Feb 2018 10:29:18 +0100 Subject: [PATCH] Clear message queue on free. --- winpr/libwinpr/utils/collections/MessageQueue.c | 2 ++ 1 file changed, 2 insertions(+) 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);