Rob Shearman : ole32: Fix the condition in HMETAFILEPICT_UserFree to match that in METAFILEPICT_UserMarshal .

Alexandre Julliard julliard at winehq.org
Tue Nov 13 08:34:43 CST 2007


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Mon Nov 12 20:11:09 2007 +0000

ole32: Fix the condition in HMETAFILEPICT_UserFree to match that in METAFILEPICT_UserMarshal.

Actually free the memory.

---

 dlls/ole32/usrmarshal.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c
index c1b5542..a1e1d89 100644
--- a/dlls/ole32/usrmarshal.c
+++ b/dlls/ole32/usrmarshal.c
@@ -1420,14 +1420,16 @@ void __RPC_USER HMETAFILEPICT_UserFree(ULONG *pFlags, HMETAFILEPICT *phMfp)
 {
     TRACE("(%s, &%p)\n", debugstr_user_flags(pFlags), *phMfp);
 
-    if ((LOWORD(*pFlags) == MSHCTX_INPROC) && *phMfp)
+    if ((LOWORD(*pFlags) != MSHCTX_INPROC) && *phMfp)
     {
         METAFILEPICT *mfpict;
 
         mfpict = GlobalLock(*phMfp);
         /* FIXME: raise an exception if mfpict is NULL? */
-
+        HMETAFILE_UserFree(pFlags, &mfpict->hMF);
         GlobalUnlock(*phMfp);
+
+        GlobalFree(*phMfp);
     }
 }
 




More information about the wine-cvs mailing list