rpcss: Fix potential leaks when removing endpoint (Coverity).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-05-22 21:44:47 +03:00 committed by Alexandre Julliard
parent 1d131cff6e
commit a87c510e9a
1 changed files with 5 additions and 3 deletions

View File

@ -165,6 +165,11 @@ void __cdecl ept_delete(handle_t h,
if (rpc_status != RPC_S_OK)
break;
entry = find_ept_entry(&iface, &syntax, protseq, endpoint, address, &entries[i].object);
I_RpcFree(protseq);
I_RpcFree(endpoint);
I_RpcFree(address);
if (entry)
delete_registered_ept_entry(entry);
else
@ -172,9 +177,6 @@ void __cdecl ept_delete(handle_t h,
*status = EPT_S_NOT_REGISTERED;
break;
}
I_RpcFree(protseq);
I_RpcFree(endpoint);
I_RpcFree(address);
}
LeaveCriticalSection(&csEpm);