James Hawkins : user32: Don't try to free a handle with a value of 1, which is the dde handle value for asynchronous operations.

Alexandre Julliard julliard at winehq.org
Tue Jan 5 11:37:51 CST 2010


Module: wine
Branch: master
Commit: 289047c7351e6fb3fa15e23824fcb65238b4854a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=289047c7351e6fb3fa15e23824fcb65238b4854a

Author: James Hawkins <truiken at gmail.com>
Date:   Mon Jan  4 17:47:02 2010 -0800

user32: Don't try to free a handle with a value of 1, which is the dde handle value for asynchronous operations.

---

 dlls/user32/dde_misc.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/dde_misc.c b/dlls/user32/dde_misc.c
index ae1df40..ac4657e 100644
--- a/dlls/user32/dde_misc.c
+++ b/dlls/user32/dde_misc.c
@@ -1468,6 +1468,11 @@ BOOL WINAPI DdeUnaccessData(HDDEDATA hData)
 BOOL WINAPI DdeFreeDataHandle(HDDEDATA hData)
 {
     TRACE("(%p)\n", hData);
+
+    /* 1 is the handle value returned by an asynchronous operation. */
+    if (hData == (HDDEDATA)1)
+        return TRUE;
+
     return GlobalFree(hData) == 0;
 }
 




More information about the wine-cvs mailing list