- Fix handle / memory leak in failure branch, spotted by Dmitry Chapyshev.

svn path=/trunk/; revision=40937
This commit is contained in:
Aleksey Bragin 2009-05-16 08:49:34 +00:00
parent 18c654d60a
commit 6c2e9822fb

View file

@ -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,