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

This commit is contained in:
Rob Shearman 2007-12-13 12:40:27 +00:00 committed by Alexandre Julliard
parent 00db711c6f
commit 9642714d06
1 changed files with 16 additions and 0 deletions

View File

@ -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);
}