mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 16:40:27 +00:00
[KERNEL32]
- Don't access freed memory in GetVolumeNameForVolumeMountPointW svn path=/trunk/; revision=44141
This commit is contained in:
parent
165c423eed
commit
5a56a7c2da
1 changed files with 2 additions and 1 deletions
|
@ -996,15 +996,16 @@ GetVolumeNameForVolumeMountPointW(
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue