BSOD fix
This commit is contained in:
DavidXanatos 2022-11-06 10:16:32 +01:00
parent 581d11130e
commit d8400bcd32
2 changed files with 5 additions and 2 deletions

View File

@ -19,7 +19,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- fixed compatibility issue with Microsoft Edge [#2312](https://github.com/sandboxie-plus/Sandboxie/issues/2312)
- fixed UsePrivacyMode=y compatibility with Windows 7 [#2423](https://github.com/sandboxie-plus/Sandboxie/issues/2423)
- fixed minor issue during Sandboxie Plus uninstall [#2421](https://github.com/sandboxie-plus/Sandboxie/issues/2421)
- fixed BSOD issue when driver initialization fails (introduced in 1.5.1) [#2431](https://github.com/sandboxie-plus/Sandboxie/issues/2431)

View File

@ -132,9 +132,9 @@ _FX BOOLEAN Ipc_Init(void)
};
const UCHAR **NamePtr;
List_Init(&Ipc_ObjDirs);
if (! Mem_GetLockResource(&Ipc_DirLock, TRUE))
return FALSE;
List_Init(&Ipc_ObjDirs);
//
// set object open handlers for generic objects
@ -1828,6 +1828,9 @@ _FX void Ipc_Unload(void)
if (Ipc_Dynamic_Ports.pPortLock)
Mem_FreeLockResource(&Ipc_Dynamic_Ports.pPortLock);
if (Ipc_DirLock == NULL)
return; // Early driver initialization failed
KIRQL irql;
KeRaiseIrql(APC_LEVEL, &irql);
ExAcquireResourceExclusiveLite(Ipc_DirLock, TRUE);