[PATCH 1/3] rpcss: Fix potential leaks when removing endpoint (Coverity)
Nikolay Sivov
nsivov at codeweavers.com
Sun May 22 13:44:47 CDT 2016
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
programs/rpcss/epmp.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/programs/rpcss/epmp.c b/programs/rpcss/epmp.c
index 2eb6039..3243192 100644
--- a/programs/rpcss/epmp.c
+++ b/programs/rpcss/epmp.c
@@ -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);
--
2.8.1
More information about the wine-patches
mailing list