oleaut32/tests: fix double GlobalFree in olepicture tests (resend) [1/3]

Jeremy Drake wine at jdrake.com
Tue Dec 16 01:41:47 CST 2008


Fix double GlobalFree in olepicture tests.  The second parameter of
CreateStreamOnHGlobal is whether the HGLOBAL should be freed on release of
the stream.  These functions call this with TRUE, and then call
GlobalUnlock and GlobalFree after releasing the stream.  This was causing
issues for me when building/running the tests in VC while I was working on
adding new tests to this file.

---
 dlls/oleaut32/tests/olepicture.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c
index 89e99dd..2b5b8bb 100644
--- a/dlls/oleaut32/tests/olepicture.c
+++ b/dlls/oleaut32/tests/olepicture.c
@@ -525,8 +525,6 @@ static void test_apm()
     ole_expect(IPicture_get_hPal(pict, &handle), E_FAIL);
     IPicture_Release(pict);
     IStream_Release(stream);
-    GlobalUnlock(hglob);
-    GlobalFree(hglob);
 }

 static void test_metafile(void)
@@ -545,8 +543,6 @@ static void test_metafile(void)
     ole_expect(OleLoadPictureEx(stream, sizeof(metafile), TRUE, &IID_IPicture, 100, 100, 0, (LPVOID *)&pict), E_FAIL);

     IStream_Release(stream);
-    GlobalUnlock(hglob);
-    GlobalFree(hglob);
 }

 static void test_enhmetafile(void)
@@ -584,8 +580,6 @@ static void test_enhmetafile(void)

     IPicture_Release(pict);
     IStream_Release(stream);
-    GlobalUnlock(hglob);
-    GlobalFree(hglob);
 }

 static void test_Render(void)
-- 
1.5.6.4





More information about the wine-patches mailing list