Rob Shearman : rpcrt4: Fix memory leak of 0-byte buffer allocated during processing of bind packets .

Alexandre Julliard julliard at winehq.org
Mon Sep 15 06:54:02 CDT 2008


Module: wine
Branch: master
Commit: 34dd53425081f135ed6a3382778afd486df6e735
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=34dd53425081f135ed6a3382778afd486df6e735

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Fri Sep 12 12:58:39 2008 +0100

rpcrt4: Fix memory leak of 0-byte buffer allocated during processing of bind packets.

In this case conn->server_binding will be NULL and consequently
bind->Handle will be NULL, causing I_RpcFreeBuffer to fail. Therefore
just use I_RpcFree to free the buffer as that is just what
I_RpcFreeBuffer does under the hood anyway.

---

 dlls/rpcrt4/rpc_server.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c
index d79e436..f8efc67 100644
--- a/dlls/rpcrt4/rpc_server.c
+++ b/dlls/rpcrt4/rpc_server.c
@@ -352,7 +352,7 @@ static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, RPC_MESSA
   }
 
   /* clean up */
-  I_RpcFreeBuffer(msg);
+  I_RpcFree(msg->Buffer);
   RPCRT4_FreeHeader(hdr);
   HeapFree(GetProcessHeap(), 0, msg);
 }




More information about the wine-cvs mailing list