mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
- GlobalReAlloc: SetUserValueHeap and SetUserFlagsHeap after RtlReAllocateHeap.
- LocalReAlloc: Add missing SetUserFlagsHeap after RtlAllocateHeap. SetUserValueHeap and SetUserFlagsHeap after RtlReAllocateHeap. svn path=/trunk/; revision=40910
This commit is contained in:
parent
0931b86d7c
commit
4832f465f1
2 changed files with 32 additions and 0 deletions
|
@ -547,6 +547,20 @@ GlobalReAlloc(HGLOBAL hMem,
|
|||
|
||||
/* And do the re-allocation */
|
||||
Ptr = RtlReAllocateHeap(hProcessHeap, Flags, Ptr, dwBytes);
|
||||
|
||||
if (Ptr)
|
||||
{
|
||||
/* Allocation succeeded, so save our entry */
|
||||
RtlSetUserValueHeap(hProcessHeap,
|
||||
HEAP_NO_SERIALIZE,
|
||||
Ptr,
|
||||
hMem);
|
||||
RtlSetUserFlagsHeap(hProcessHeap,
|
||||
HEAP_NO_SERIALIZE,
|
||||
Ptr,
|
||||
Flags);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Make sure we have a pointer by now */
|
||||
|
|
|
@ -354,6 +354,11 @@ LocalReAlloc(HLOCAL hMem,
|
|||
HEAP_NO_SERIALIZE,
|
||||
Ptr,
|
||||
hMem);
|
||||
RtlSetUserFlagsHeap(hProcessHeap,
|
||||
HEAP_NO_SERIALIZE,
|
||||
Ptr,
|
||||
Flags);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -375,6 +380,19 @@ LocalReAlloc(HLOCAL hMem,
|
|||
|
||||
/* And do the re-allocation */
|
||||
Ptr = RtlReAllocateHeap(hProcessHeap, Flags, Ptr, dwBytes);
|
||||
|
||||
if (Ptr)
|
||||
{
|
||||
/* Allocation succeeded, so save our entry */
|
||||
RtlSetUserValueHeap(hProcessHeap,
|
||||
HEAP_NO_SERIALIZE,
|
||||
Ptr,
|
||||
hMem);
|
||||
RtlSetUserFlagsHeap(hProcessHeap,
|
||||
HEAP_NO_SERIALIZE,
|
||||
Ptr,
|
||||
Flags);
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure we have a pointer by now */
|
||||
|
|
Loading…
Reference in a new issue