rpcrt4: A NULL IfSpec in RpcServerUnregisterIf should remove all interfaces, not crash.

This commit is contained in:
Rob Shearman 2007-01-02 15:39:54 +00:00 committed by Alexandre Julliard
parent ecfe54df46
commit 776f81b3be
1 changed files with 1 additions and 1 deletions

View File

@ -831,7 +831,7 @@ RPC_STATUS WINAPI RpcServerUnregisterIf( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid
EnterCriticalSection(&server_cs);
LIST_FOR_EACH_ENTRY(cif, &server_interfaces, RpcServerInterface, entry) {
if (!memcmp(&If->InterfaceId, &cif->If->InterfaceId, sizeof(RPC_SYNTAX_IDENTIFIER)) &&
if ((!IfSpec || !memcmp(&If->InterfaceId, &cif->If->InterfaceId, sizeof(RPC_SYNTAX_IDENTIFIER))) &&
UuidEqual(MgrTypeUuid, &cif->MgrTypeUuid, &status)) {
list_remove(&cif->entry);
if (cif->CurrentCalls) {