mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:52:57 +00:00
[RTL]
- Revert r54660 and properly fix NtAllocateVirtualMemory/NtFreeVirtualMemory usage svn path=/trunk/; revision=54666
This commit is contained in:
parent
6b5f6de9b9
commit
80ecdce6cc
1 changed files with 4 additions and 3 deletions
|
@ -29,7 +29,7 @@ RtlCreateQueryDebugBuffer(IN ULONG Size,
|
||||||
(PVOID*)&Buf,
|
(PVOID*)&Buf,
|
||||||
0,
|
0,
|
||||||
&ViewSize,
|
&ViewSize,
|
||||||
MEM_COMMIT,
|
MEM_RESERVE | MEM_COMMIT,
|
||||||
PAGE_READWRITE);
|
PAGE_READWRITE);
|
||||||
if (!NT_SUCCESS(Status)) return NULL;
|
if (!NT_SUCCESS(Status)) return NULL;
|
||||||
|
|
||||||
|
@ -49,12 +49,13 @@ NTAPI
|
||||||
RtlDestroyQueryDebugBuffer(IN PRTL_DEBUG_INFORMATION Buf)
|
RtlDestroyQueryDebugBuffer(IN PRTL_DEBUG_INFORMATION Buf)
|
||||||
{
|
{
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
SIZE_T ViewSize = 0;
|
||||||
|
|
||||||
if (NULL != Buf)
|
if (NULL != Buf)
|
||||||
{
|
{
|
||||||
Status = NtFreeVirtualMemory(NtCurrentProcess(),
|
Status = NtFreeVirtualMemory(NtCurrentProcess(),
|
||||||
(PVOID)Buf,
|
(PVOID*)&Buf,
|
||||||
(PSIZE_T)&Buf->ViewSize, /* FIXME: not portable! */
|
&ViewSize,
|
||||||
MEM_RELEASE);
|
MEM_RELEASE);
|
||||||
}
|
}
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue