From 0fd184773a90a44ae5fd8dd493646ac9d6796e0e Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Mon, 22 May 2006 22:17:53 +0100 Subject: [PATCH] ole32: Release the outer unknown in the proxybuffer test. Release the outer unknown in the proxybuffer test to show that the last release of the outer unknown doesn't free the proxy buffer. --- dlls/ole32/tests/marshal.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index dffff9dc317..8ecbe4259ea 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -1400,13 +1400,18 @@ static void test_proxybuffer(REFIID riid) ok_ole_success(hr, IPSFactoryBuffer_CreateProxy); ok(lpvtbl != NULL, "IPSFactoryBuffer_CreateProxy succeeded, but returned a NULL vtable!\n"); + /* release our reference to the outer unknown object - the PS factory + * buffer will have AddRef's it in the CreateProxy call */ + refs = IUnknown_Release((IUnknown *)pUnkOuter); + ok(refs == 1, "Ref count of outer unknown should have been 1 instead of %ld\n", refs); + refs = IPSFactoryBuffer_Release(psfb); #if 0 /* not reliable on native. maybe it leaks references! */ ok(refs == 0, "Ref-count leak of %ld on IPSFactoryBuffer\n", refs); #endif refs = IUnknown_Release((IUnknown *)lpvtbl); - ok(refs == 1, "Ref-count leak of %ld on IRpcProxyBuffer\n", refs-1); + ok(refs == 0, "Ref-count leak of %ld on IRpcProxyBuffer\n", refs); refs = IRpcProxyBuffer_Release(proxy); ok(refs == 0, "Ref-count leak of %ld on IRpcProxyBuffer\n", refs); -- 2.11.4.GIT