Rob Shearman : rpcrt4: Add tests for freeing non-NdrAllocate allocated memory blocks.

Alexandre Julliard julliard at winehq.org
Thu Dec 13 08:23:15 CST 2007


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Thu Dec 13 12:40:27 2007 +0000

rpcrt4: Add tests for freeing non-NdrAllocate allocated memory blocks.

---

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

diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c
index f0028bd..d19d50f 100644
--- a/dlls/rpcrt4/tests/ndr_marshall.c
+++ b/dlls/rpcrt4/tests/ndr_marshall.c
@@ -1195,6 +1195,14 @@ todo_wine {
     NdrPointerFree( &StubMsg, mem, fmtstr_conf_str );
     ok(my_free_called == 1, "free called %d\n", my_free_called);
 
+    mem = my_alloc(10);
+    my_free_called = 0;
+    StubMsg.Buffer = StubMsg.BufferStart;
+    NdrPointerFree( &StubMsg, mem, fmtstr_conf_str );
+todo_wine {
+    ok(my_free_called == 1, "free called %d\n", my_free_called);
+}
+
     /* Server */
     my_alloc_called = 0;
     StubMsg.IsClient = 0;
@@ -1232,6 +1240,14 @@ todo_wine {
     ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called);
 }
 
+    mem = my_alloc(10);
+    my_free_called = 0;
+    StubMsg.Buffer = StubMsg.BufferStart;
+    NdrPointerFree( &StubMsg, mem, fmtstr_conf_str );
+todo_wine {
+    ok(my_free_called == 1, "free called %d\n", my_free_called);
+}
+
     HeapFree(GetProcessHeap(), 0, mem_orig);
     HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer);
 }




More information about the wine-cvs mailing list