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);
|
&ResultSize);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
NtClose(KeyHandle);
|
||||||
|
RtlFreeHeap(RtlGetProcessHeap(), 0, KeyInfo);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
RtlCopyMemory(SearchPathBuffer,
|
RtlCopyMemory(SearchPathBuffer,
|
||||||
&KeyInfo->Data,
|
&KeyInfo->Data,
|
||||||
|
|
Loading…
Reference in a new issue