Skip to content

Commit

Permalink
Fix double handle closing
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Jul 28, 2021
1 parent 027a03c commit 2579886
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions unicon/inject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ __declspec(dllexport) void inject(unsigned Pid)
if (!is_conhost(Name))
throw std::runtime_error("not conhost");

SCOPE_EXIT{ CloseHandle(Process); };

const auto FullDllPathSize = (wcslen(FullDllPath) + 1) * sizeof(wchar_t);

const auto DllPathAddress = VirtualAllocEx(Process, {}, FullDllPathSize, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
Expand Down

0 comments on commit 2579886

Please sign in to comment.