From 48344f505b3246d3704c4136fd998801d6e0c924 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Sun, 17 Dec 2006 23:45:22 +0000 Subject: [PATCH] rpcrt4: Free the resource allocated by InitializeSecurityContext when the connection is closed. --- dlls/rpcrt4/rpc_transport.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index f8091dac6dd..ceae31d60ee 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -1280,6 +1280,11 @@ RPC_STATUS RPCRT4_OpenClientConnection(RpcConnection* Connection) RPC_STATUS RPCRT4_CloseConnection(RpcConnection* Connection) { TRACE("(Connection == ^%p)\n", Connection); + if (SecIsValidHandle(&Connection->ctx)) + { + DeleteSecurityContext(&Connection->ctx); + SecInvalidateHandle(&Connection->ctx); + } rpcrt4_conn_close(Connection); return RPC_S_OK; }