From: Etaash Mathamsetty 45927311+Etaash-mathamsetty@users.noreply.github.com
--- dlls/ntdll/heap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 921a51cf8b1..aca8e7181a8 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -2052,9 +2052,8 @@ void *WINAPI DECLSPEC_HOTPATCH RtlAllocateHeap( HANDLE handle, ULONG flags, SIZE ULONG heap_flags; NTSTATUS status;
- if (!(heap = unsafe_heap_from_handle( handle, flags, &heap_flags ))) - status = STATUS_INVALID_HANDLE; - else if ((block_size = heap_get_block_size( heap, heap_flags, size )) == ~0U) + heap = unsafe_heap_from_handle( handle, flags, &heap_flags ); + if ((block_size = heap_get_block_size( heap, heap_flags, size )) == ~0U) status = STATUS_NO_MEMORY; else if (block_size >= HEAP_MIN_LARGE_BLOCK_SIZE) status = heap_allocate_large( heap, heap_flags, block_size, size, &ptr );