[PATCH] comctl32/propsheet: Avoid posting uninitialized data (Valgrind).

Nikolay Sivov nsivov at codeweavers.com
Mon Feb 25 02:37:33 CST 2019


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46691
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/comctl32/propsheet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 09a455121c..88dab3421c 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -2760,7 +2760,7 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
 
 static INT do_loop(const PropSheetInfo *psInfo)
 {
-    MSG msg;
+    MSG msg = { 0 };
     INT ret = 0;
     HWND hwnd = psInfo->hwnd;
     HWND parent = psInfo->ppshheader.hwndParent;
@@ -2777,7 +2777,7 @@ static INT do_loop(const PropSheetInfo *psInfo)
         }
     }
 
-    if(ret == 0)
+    if(ret == 0 && msg.message)
         PostQuitMessage(msg.wParam);
 
     if(ret != -1)
-- 
2.20.1




More information about the wine-devel mailing list