cleanup critical section(SbieDll.dll is not included).
This commit is contained in:
parent
07862a28a5
commit
4fa3fdfd08
|
@ -601,6 +601,9 @@ do_kill_all:
|
|||
}
|
||||
}
|
||||
|
||||
// cleanup CS
|
||||
DeleteCriticalSection(&ProcessCritSec);
|
||||
|
||||
// this process is no longer needed
|
||||
|
||||
ExitProcess(0);
|
||||
|
|
|
@ -174,6 +174,12 @@ _FX BOOL WINAPI DllMain(
|
|||
File_DoAutoRecover(TRUE);
|
||||
Gui_ResetClipCursor();
|
||||
}
|
||||
|
||||
#ifdef _WIN64
|
||||
// cleanup CS
|
||||
DeleteCriticalSection(&VT_CriticalSection);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -65,6 +65,12 @@ DriverAssist::DriverAssist()
|
|||
InitializeCriticalSection(&m_critSecHostInjectedSvcs);
|
||||
}
|
||||
|
||||
DriverAssist::~DriverAssist()
|
||||
{
|
||||
DeleteCriticalSection(&m_LogMessage_CritSec);
|
||||
DeleteCriticalSection(&m_critSecHostInjectedSvcs);
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Initialize
|
||||
|
|
|
@ -45,6 +45,8 @@ private:
|
|||
|
||||
DriverAssist();
|
||||
|
||||
~DriverAssist();
|
||||
|
||||
bool InitializePortAndThreads();
|
||||
|
||||
void ShutdownPortAndThreads();
|
||||
|
|
|
@ -131,6 +131,12 @@ GuiServer::GuiServer()
|
|||
GetModuleHandle(L"user32.dll"), "SetProcessDpiAwarenessContext");
|
||||
}
|
||||
|
||||
GuiServer::~GuiServer()
|
||||
{
|
||||
// cleanup CS
|
||||
DeleteCriticalSection(&m_SlavesLock);
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// GuiServer
|
||||
|
@ -4650,4 +4656,4 @@ ULONG GuiServer::KillJob(SlaveArgs* args)
|
|||
}
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,8 @@ protected:
|
|||
|
||||
GuiServer();
|
||||
|
||||
~GuiServer();
|
||||
|
||||
static void ReportError2336(
|
||||
ULONG session_id, ULONG errlvl, ULONG status);
|
||||
|
||||
|
|
|
@ -217,6 +217,9 @@ PipeServer::~PipeServer()
|
|||
|
||||
if (m_pool)
|
||||
Pool_Delete(m_pool);
|
||||
|
||||
// cleanup CS
|
||||
DeleteCriticalSection(&m_lock);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1187,4 +1190,4 @@ bool PipeServer::IsCallerAdmin()
|
|||
// }
|
||||
//
|
||||
// return NT_SUCCESS(status);
|
||||
//}
|
||||
//}
|
||||
|
|
|
@ -66,6 +66,12 @@ ProxyHandle::ProxyHandle(HANDLE heap, ULONG size_of_data,
|
|||
m_unique_id = 'sbox';
|
||||
}
|
||||
|
||||
ProxyHandle::~ProxyHandle()
|
||||
{
|
||||
// cleanup CS
|
||||
DeleteCriticalSection(&m_lock);
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Create
|
||||
|
|
|
@ -36,6 +36,8 @@ public:
|
|||
P_ProxyHandle_CloseCallback close_callback,
|
||||
void *context_for_callback);
|
||||
|
||||
~ProxyHandle();
|
||||
|
||||
ULONG Create(HANDLE process_id, void *model_data);
|
||||
|
||||
void *Find(HANDLE process_id, ULONG unique_id);
|
||||
|
|
|
@ -170,6 +170,12 @@ ComServer::ComServer(PipeServer *pipeServer)
|
|||
pipeServer->Register(MSGID_COM, this, Handler);
|
||||
}
|
||||
|
||||
ComServer::~ComServer()
|
||||
{
|
||||
// cleanup CS
|
||||
DeleteCriticalSection(&m_SlavesLock);
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Handler
|
||||
|
|
|
@ -33,6 +33,7 @@ class ComServer
|
|||
public:
|
||||
|
||||
ComServer(PipeServer *pipeServer);
|
||||
~ComServer();
|
||||
|
||||
void DeleteAllSlaves();
|
||||
|
||||
|
|
|
@ -78,6 +78,12 @@ QueueServer::QueueServer(PipeServer *pipeServer)
|
|||
pipeServer->Register(MSGID_QUEUE, this, Handler);
|
||||
}
|
||||
|
||||
QueueServer::~QueueServer()
|
||||
{
|
||||
// cleanup CS
|
||||
DeleteCriticalSection(&m_lock);
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// CloseCallback
|
||||
|
|
|
@ -33,6 +33,7 @@ class QueueServer
|
|||
public:
|
||||
|
||||
QueueServer(PipeServer *pipeServer);
|
||||
~QueueServer();
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -82,6 +82,9 @@ SbieIniServer::~SbieIniServer()
|
|||
delete m_pConfigIni;
|
||||
|
||||
LeaveCriticalSection(&m_instance->m_critsec);
|
||||
|
||||
// cleanup CS
|
||||
DeleteCriticalSection(&m_instance->m_critsec);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue