Commit 9642714d authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

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

parent 00db711c
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment