Module: wine Branch: master Commit: 7f9d5aad7ca1b6468df4aa9259f4b4fcaa588555 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7f9d5aad7ca1b6468df4aa9259...
Author: Nikolay Sivov bunglehead@gmail.com Date: Fri Dec 11 15:14:32 2009 +0300
oleaut32/tests: Fix a couple of leaks in tests.
---
dlls/oleaut32/tests/olepicture.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index 55d883b..c8ddc8a 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -357,6 +357,7 @@ static void test_empty_image(void) { ok (hres == S_OK,"empty picture get handle failed with hres 0x%08x\n", hres); ok (handle == 0, "empty picture get handle did not return 0, but 0x%08x\n", handle); IPicture_Release (pic); + IStream_Release (stream); }
static void test_empty_image_2(void) { @@ -395,6 +396,7 @@ static void test_empty_image_2(void) { ok (type == PICTYPE_NONE,"type is %d, but should be PICTYPE_NONE(0)\n", type);
IPicture_Release (pic); + IStream_Release (stream); }
static void test_Invoke(void) @@ -408,16 +410,17 @@ static void test_Invoke(void) HGLOBAL hglob; void *data;
- hglob = GlobalAlloc (0, sizeof(gifimage)); - data = GlobalLock(hglob); - memcpy(data, gifimage, sizeof(gifimage)); + hglob = GlobalAlloc (0, sizeof(gifimage)); + data = GlobalLock(hglob); + memcpy(data, gifimage, sizeof(gifimage)); GlobalUnlock(hglob);
- hr = CreateStreamOnHGlobal (hglob, FALSE, &stream); + hr = CreateStreamOnHGlobal (hglob, FALSE, &stream); ok_ole_success(hr, "CreateStreamOnHGlobal");
- hr = pOleLoadPicture(stream, sizeof(gifimage), TRUE, &IID_IPictureDisp, (void **)&picdisp); + hr = pOleLoadPicture(stream, sizeof(gifimage), TRUE, &IID_IPictureDisp, (void **)&picdisp); IStream_Release(stream); + GlobalFree(hglob); ok_ole_success(hr, "OleLoadPicture");
V_VT(&vararg) = VT_BOOL;