rpcrt4: Initialize all rpc_server_registered_auth_info fields in RpcServerRegisterAuthInfoW.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2016-11-08 17:29:53 +01:00 committed by Alexandre Julliard
parent 11a5964d3a
commit ad77b4c5fd
1 changed files with 2 additions and 4 deletions

View File

@ -1449,13 +1449,11 @@ RPC_STATUS WINAPI RpcServerRegisterAuthInfoW( RPC_WSTR ServerPrincName, ULONG Au
max_token = package->cbMaxToken;
FreeContextBuffer(packages);
auth_info = HeapAlloc(GetProcessHeap(), 0, sizeof(*auth_info));
auth_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*auth_info));
if (!auth_info)
return RPC_S_OUT_OF_RESOURCES;
if (!ServerPrincName) {
auth_info->principal = NULL;
}else if (!(auth_info->principal = RPCRT4_strdupW(ServerPrincName))) {
if (ServerPrincName && !(auth_info->principal = RPCRT4_strdupW(ServerPrincName))) {
HeapFree(GetProcessHeap(), 0, auth_info);
return RPC_S_OUT_OF_RESOURCES;
}