rpcrt4: Check the return value of RPCRT4_ClientAuthorize in RPCRT4_Send.

This commit is contained in:
Rob Shearman 2008-01-23 16:33:03 +00:00 committed by Alexandre Julliard
parent 2badb4faea
commit 7277113af3
1 changed files with 6 additions and 3 deletions

View File

@ -676,9 +676,12 @@ RPC_STATUS RPCRT4_Send(RpcConnection *Connection, RpcPktHdr *Header,
}
/* tack on a negotiate packet */
RPCRT4_ClientAuthorize(Connection, NULL, &out);
r = RPCRT4_SendAuth(Connection, Header, Buffer, BufferLength, out.pvBuffer, out.cbBuffer);
HeapFree(GetProcessHeap(), 0, out.pvBuffer);
r = RPCRT4_ClientAuthorize(Connection, NULL, &out);
if (r == RPC_S_OK)
{
r = RPCRT4_SendAuth(Connection, Header, Buffer, BufferLength, out.pvBuffer, out.cbBuffer);
HeapFree(GetProcessHeap(), 0, out.pvBuffer);
}
return r;
}