mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
- Fix handle / memory leak in failure branch, spotted by Dmitry Chapyshev.
svn path=/trunk/; revision=40937
This commit is contained in:
parent
18c654d60a
commit
6c2e9822fb
1 changed files with 4 additions and 0 deletions
|
@ -239,7 +239,11 @@ LdrpQueryAppPaths(IN PCWSTR ImageName)
|
|||
&ResultSize);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
NtClose(KeyHandle);
|
||||
RtlFreeHeap(RtlGetProcessHeap(), 0, KeyInfo);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RtlCopyMemory(SearchPathBuffer,
|
||||
&KeyInfo->Data,
|
||||
|
|
Loading…
Reference in a new issue