Author: fireball
Date: Sat May 16 12:49:34 2009
New Revision: 40937
URL:
http://svn.reactos.org/svn/reactos?rev=40937&view=rev
Log:
- Fix handle / memory leak in failure branch, spotted by Dmitry Chapyshev.
Modified:
trunk/reactos/dll/ntdll/ldr/utils.c
Modified: trunk/reactos/dll/ntdll/ldr/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/utils.c?rev=…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] Sat May 16 12:49:34 2009
@@ -239,7 +239,11 @@
&ResultSize);
if (!NT_SUCCESS(Status))
+ {
+ NtClose(KeyHandle);
+ RtlFreeHeap(RtlGetProcessHeap(), 0, KeyInfo);
return NULL;
+ }
RtlCopyMemory(SearchPathBuffer,
&KeyInfo->Data,