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.
This commit is contained in:
Rob Shearman 2008-09-12 12:58:39 +01:00 committed by Alexandre Julliard
parent ffd37b0eec
commit 34dd534250
1 changed files with 1 additions and 1 deletions

View File

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