Author: janderwald
Date: Fri Nov 13 18:31:02 2009
New Revision: 44141
URL:
http://svn.reactos.org/svn/reactos?rev=44141&view=rev
Log:
[KERNEL32]
- Don't access freed memory in GetVolumeNameForVolumeMountPointW
Modified:
trunk/reactos/dll/win32/kernel32/file/volume.c
Modified: trunk/reactos/dll/win32/kernel32/file/volume.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/vo…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/volume.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/volume.c [iso-8859-1] Fri Nov 13 18:31:02 2009
@@ -996,15 +996,16 @@
MountPoints, BufferLength);
if (!NT_SUCCESS(Status))
{
- RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints);
if (Status == STATUS_BUFFER_OVERFLOW)
{
BufferLength = MountPoints->Size;
+ RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints);
continue;
}
else if (!NT_SUCCESS(Status))
{
RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint);
+ RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints);
NtClose(FileHandle);
SetLastErrorByStatus(Status);
return FALSE;