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:
parent
ffd37b0eec
commit
34dd534250
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue