mirror of
https://github.com/microsoft/PowerToys
synced 2025-09-02 15:35:12 +00:00
[CodeQuality]Fix C++ static analyzer findings (#29745)
* [PVS] Fix static analyzer findings * f: fix error handling * f: more improvements * Update src/modules/FileLocksmith/FileLocksmithLibInterop/NtdllExtensions.cpp
This commit is contained in:
@@ -616,10 +616,10 @@ void close_settings_window()
|
||||
{
|
||||
if (g_settings_process_id != 0)
|
||||
{
|
||||
HANDLE proc = OpenProcess(PROCESS_TERMINATE, false, g_settings_process_id);
|
||||
if (proc != INVALID_HANDLE_VALUE)
|
||||
wil::unique_handle proc{ OpenProcess(PROCESS_TERMINATE, false, g_settings_process_id) };
|
||||
if (proc)
|
||||
{
|
||||
TerminateProcess(proc, 0);
|
||||
TerminateProcess(proc.get(), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user