Rob Shearman : rpcrt4: Fix some memory leaks in the cstub tests.

Alexandre Julliard julliard at winehq.org
Mon Dec 14 09:51:12 CST 2009


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

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Sun Dec 13 19:46:13 2009 +0000

rpcrt4: Fix some memory leaks in the cstub tests.

---

 dlls/rpcrt4/tests/cstub.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/rpcrt4/tests/cstub.c b/dlls/rpcrt4/tests/cstub.c
index ca871b7..93a7fe3 100644
--- a/dlls/rpcrt4/tests/cstub.c
+++ b/dlls/rpcrt4/tests/cstub.c
@@ -770,6 +770,8 @@ static void test_CreateStub(IPSFactoryBuffer *ppsf)
     /* 0xdeadbeef returned from create_stub_test_QI */
     ok(cstd_stub->pvServerObject == (void*)0xdeadbeef, "pvServerObject %p\n", cstd_stub->pvServerObject);
     ok(cstd_stub->pPSFactory != NULL, "pPSFactory was NULL\n");
+    cstd_stub->pvServerObject = NULL;
+    IRpcStubBuffer_Release(pstub);
 
     vtbl = &create_stub_test_fail_vtbl;
     pstub = create_stub(ppsf, &IID_if1, obj, E_NOINTERFACE);
@@ -908,6 +910,7 @@ static void test_Disconnect(IPSFactoryBuffer *ppsf)
     IRpcStubBuffer_Disconnect(pstub);
     ok(connect_test_orig_release_called == 1, "release called %d\n", connect_test_orig_release_called);
     ok(cstd_stub->pvServerObject == NULL, "pvServerObject %p\n", cstd_stub->pvServerObject);
+    IRpcStubBuffer_Release(pstub);
 }
 
 




More information about the wine-cvs mailing list