Allow freeing locked global memory handles.
This commit is contained in:
parent
1848c808d3
commit
2e7008cdb0
|
@ -1274,10 +1274,16 @@ HGLOBAL WINAPI GlobalReAlloc(
|
||||||
{
|
{
|
||||||
/* reallocate a moveable block */
|
/* reallocate a moveable block */
|
||||||
pintern=HANDLE_TO_INTERN(hmem);
|
pintern=HANDLE_TO_INTERN(hmem);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* Apparently Windows doesn't care whether the handle is locked at this point */
|
||||||
|
/* See also the same comment in GlobalFree() */
|
||||||
if(pintern->LockCount>1) {
|
if(pintern->LockCount>1) {
|
||||||
ERR("handle 0x%08lx is still locked, cannot realloc!\n",(DWORD)hmem);
|
ERR("handle 0x%08lx is still locked, cannot realloc!\n",(DWORD)hmem);
|
||||||
SetLastError(ERROR_INVALID_HANDLE);
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
} else if(size!=0)
|
} else
|
||||||
|
#endif
|
||||||
|
if(size!=0)
|
||||||
{
|
{
|
||||||
hnew=hmem;
|
hnew=hmem;
|
||||||
if(pintern->Pointer)
|
if(pintern->Pointer)
|
||||||
|
|
Loading…
Reference in New Issue