Commit 4f596c04 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

kernelbase: Remove unnecessary handler from LocalUnlock.

parent e358731f
...@@ -918,6 +918,7 @@ HLOCAL WINAPI DECLSPEC_HOTPATCH LocalReAlloc( HLOCAL handle, SIZE_T size, UINT f ...@@ -918,6 +918,7 @@ HLOCAL WINAPI DECLSPEC_HOTPATCH LocalReAlloc( HLOCAL handle, SIZE_T size, UINT f
*/ */
BOOL WINAPI DECLSPEC_HOTPATCH LocalUnlock( HLOCAL handle ) BOOL WINAPI DECLSPEC_HOTPATCH LocalUnlock( HLOCAL handle )
{ {
HANDLE heap = GetProcessHeap();
struct mem_entry *mem; struct mem_entry *mem;
BOOL ret = FALSE; BOOL ret = FALSE;
...@@ -929,9 +930,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH LocalUnlock( HLOCAL handle ) ...@@ -929,9 +930,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH LocalUnlock( HLOCAL handle )
return FALSE; return FALSE;
} }
RtlLockHeap( GetProcessHeap() ); RtlLockHeap( heap );
__TRY
{
if ((mem = unsafe_mem_from_HLOCAL( handle ))) if ((mem = unsafe_mem_from_HLOCAL( handle )))
{ {
if (mem->lock) if (mem->lock)
...@@ -951,14 +950,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH LocalUnlock( HLOCAL handle ) ...@@ -951,14 +950,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH LocalUnlock( HLOCAL handle )
WARN_(globalmem)( "invalid handle %p\n", handle ); WARN_(globalmem)( "invalid handle %p\n", handle );
SetLastError( ERROR_INVALID_HANDLE ); SetLastError( ERROR_INVALID_HANDLE );
} }
} RtlUnlockHeap( heap );
__EXCEPT_PAGE_FAULT
{
WARN_(globalmem)( "(%p): Page fault occurred ! Caused by bug ?\n", handle );
SetLastError( ERROR_INVALID_PARAMETER );
}
__ENDTRY
RtlUnlockHeap( GetProcessHeap() );
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment