[PATCH] user32: Initialize hdd HDDEDATA to NULL (valgrind).

Roy Shea royshea at gmail.com
Wed Jun 18 14:00:59 CDT 2008


The hdd variable of WDML_SyncWaitTransactionReply is passed into
WDML_HandleReply, which assigns a value to it on some (but not all)
paths.  This patch addresses the following valgrind error:

Conditional jump or move depends on uninitialised value(s)
    WDML_SyncWaitTransactionReply (dde_client.c:1057)
    DdeDisconnect (dde_client.c:1389)
Uninitialised value was created by a stack allocation
    WDML_SyncWaitTransactionReply (dde_client.c:1013)
---
 dlls/user32/dde_client.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/dde_client.c b/dlls/user32/dde_client.c
index 1a868ef..31a1251 100644
--- a/dlls/user32/dde_client.c
+++ b/dlls/user32/dde_client.c
@@ -1032,7 +1032,7 @@ static HDDEDATA WDML_SyncWaitTransactionReply(HCONV hConv, DWORD dwTimeout, cons
 
 	    while (PeekMessageW(&msg, 0, WM_DDE_FIRST, WM_DDE_LAST, PM_REMOVE))
 	    {
-                HDDEDATA hdd;
+                HDDEDATA hdd = NULL;
 
                 pConv = WDML_GetConv(hConv, FALSE);
                 if (pConv == NULL)
-- 
1.5.3.6




More information about the wine-patches mailing list