Rob Shearman : rpcrt4: Fix potential memory leaks in RPCRT4_Receive.
Alexandre Julliard
julliard at winehq.org
Tue Feb 5 06:34:32 CST 2008
Module: wine
Branch: master
Commit: 8e667fd89c48ff577da079ae16dd24598f080303
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8e667fd89c48ff577da079ae16dd24598f080303
Author: Rob Shearman <rob at codeweavers.com>
Date: Mon Feb 4 22:22:47 2008 +0000
rpcrt4: Fix potential memory leaks in RPCRT4_Receive.
---
dlls/rpcrt4/rpc_message.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c
index 74e0052..068adf1 100644
--- a/dlls/rpcrt4/rpc_message.c
+++ b/dlls/rpcrt4/rpc_message.c
@@ -813,6 +813,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
void *payload = NULL;
*Header = NULL;
+ pMsg->Buffer = NULL;
TRACE("(%p, %p, %p)\n", Connection, Header, pMsg);
@@ -964,6 +965,8 @@ fail:
if (CurrentHeader != *Header)
RPCRT4_FreeHeader(CurrentHeader);
if (status != RPC_S_OK) {
+ I_RpcFree(pMsg->Buffer);
+ pMsg->Buffer = NULL;
RPCRT4_FreeHeader(*Header);
*Header = NULL;
}
More information about the wine-cvs
mailing list