mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 04:20:46 +00:00
[RPCRT4]
- Free parameters allocated by application before anything else. See CORE-8200 #comment committed in r63605, waiting for wine to accept it before closing. svn path=/trunk/; revision=63605
This commit is contained in:
parent
f5d1d7e5b1
commit
c1b41411c2
1 changed files with 14 additions and 5 deletions
|
@ -1079,6 +1079,19 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg,
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
LONG_PTR *retval_ptr = NULL;
|
LONG_PTR *retval_ptr = NULL;
|
||||||
|
|
||||||
|
if (phase == STUBLESS_FREE)
|
||||||
|
{
|
||||||
|
/* Process the params allocated by the application first */
|
||||||
|
for (i = 0; i < number_of_params; i++)
|
||||||
|
{
|
||||||
|
unsigned char *pArg = pStubMsg->StackTop + params[i].stack_offset;
|
||||||
|
if (params[i].attr.MustFree)
|
||||||
|
{
|
||||||
|
call_freer(pStubMsg, pArg, ¶ms[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < number_of_params; i++)
|
for (i = 0; i < number_of_params; i++)
|
||||||
{
|
{
|
||||||
unsigned char *pArg = pStubMsg->StackTop + params[i].stack_offset;
|
unsigned char *pArg = pStubMsg->StackTop + params[i].stack_offset;
|
||||||
|
@ -1096,11 +1109,7 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg,
|
||||||
call_marshaller(pStubMsg, pArg, ¶ms[i]);
|
call_marshaller(pStubMsg, pArg, ¶ms[i]);
|
||||||
break;
|
break;
|
||||||
case STUBLESS_FREE:
|
case STUBLESS_FREE:
|
||||||
if (params[i].attr.MustFree)
|
if (params[i].attr.ServerAllocSize)
|
||||||
{
|
|
||||||
call_freer(pStubMsg, pArg, ¶ms[i]);
|
|
||||||
}
|
|
||||||
else if (params[i].attr.ServerAllocSize)
|
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, *(void **)pArg);
|
HeapFree(GetProcessHeap(), 0, *(void **)pArg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue