dlls/oleaut32/tests: fix double GlobalFree in olepicture tests

Jeremy Drake wine at jdrake.com
Wed Nov 19 00:57:01 CST 2008


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 3f44696..3a2a216 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);
 }

 START_TEST(olepicture)
-- 
1.5.6.4





More information about the wine-patches mailing list