[SHELLFIND] Fix handle leak for stop event
authorBrock Mammen <brockmammen@gmail.com>
Fri, 23 Aug 2019 22:24:41 +0000 (17:24 -0500)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 15 Sep 2019 16:46:36 +0000 (19:46 +0300)
dll/win32/browseui/shellfind/CFindFolder.cpp

index 0bd98e0..357a1f0 100644 (file)
@@ -224,7 +224,9 @@ DWORD WINAPI CFindFolder::SearchThreadProc(LPVOID lpParameter)
     CStringW status;
     status.Format(IDS_SEARCH_FILES_FOUND, uTotalFound);
     ::PostMessageW(data->hwnd, WM_SEARCH_UPDATE_STATUS, 0, (LPARAM) StrDupW(status.GetBuffer()));
+    ::SendMessageW(data->hwnd, WM_SEARCH_STOP, 0, 0);
 
+    CloseHandle(data->hStopEvent);
     delete data;
 
     return 0;