Alexandre Julliard : rpcrt4: Make sure we don't try to free a pointer twice .
Alexandre Julliard
julliard at winehq.org
Mon Jun 20 14:24:11 CDT 2011
Module: wine
Branch: master
Commit: 781ff545cfbdcfd5e91a9308ef6dc7fde8ac032a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=781ff545cfbdcfd5e91a9308ef6dc7fde8ac032a
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jun 20 14:07:59 2011 +0200
rpcrt4: Make sure we don't try to free a pointer twice.
---
dlls/rpcrt4/ndr_stubless.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c
index bbc9c19..c5f3074 100644
--- a/dlls/rpcrt4/ndr_stubless.c
+++ b/dlls/rpcrt4/ndr_stubless.c
@@ -1241,18 +1241,18 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg,
else
call_freer(pStubMsg, *(unsigned char **)pArg, pTypeFormat);
}
-
- if (pParam->param_attributes.IsOut &&
- !pParam->param_attributes.IsIn &&
- !pParam->param_attributes.IsByValue &&
- !pParam->param_attributes.ServerAllocSize)
+ else if (pParam->param_attributes.ServerAllocSize)
+ {
+ HeapFree(GetProcessHeap(), 0, *(void **)pArg);
+ }
+ else if (pParam->param_attributes.IsOut &&
+ !pParam->param_attributes.IsIn &&
+ !pParam->param_attributes.IsByValue)
{
if (*pTypeFormat != RPC_FC_BIND_CONTEXT)
pStubMsg->pfnFree(*(void **)pArg);
}
- if (pParam->param_attributes.ServerAllocSize)
- HeapFree(GetProcessHeap(), 0, *(void **)pArg);
break;
case STUBLESS_INITOUT:
if (!pParam->param_attributes.IsIn &&
More information about the wine-cvs
mailing list