Skip to content
Snippets Groups Projects
Commit e77bdbb1 authored by Andreas Mohr's avatar Andreas Mohr Committed by Alexandre Julliard
Browse files

Fixed crash in UnMapLS for pointers not belonging to the segptr heap.

parent ea186796
Branches
Tags
No related merge requests found
......@@ -908,7 +908,7 @@ void WINAPI UnMapLS( SEGPTR sptr )
/* check if ptr is inside segptr heap */
EnterCriticalSection( &segptrHeap->critSection );
subheap = HEAP_FindSubHeap( segptrHeap, PTR_SEG_TO_LIN(sptr) );
if (subheap->selector != SELECTOROF(sptr)) subheap = NULL;
if ((subheap) && (subheap->selector != SELECTOROF(sptr))) subheap = NULL;
LeaveCriticalSection( &segptrHeap->critSection );
/* if not inside heap, free the selector */
if (!subheap) FreeSelector16( SELECTOROF(sptr) );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment