Avoid zero size allocations.
This commit is contained in:
parent
deca2502d6
commit
7d2f5a7b15
|
@ -202,6 +202,8 @@ static void reserve_area( void *addr, void *end )
|
||||||
void *ptr;
|
void *ptr;
|
||||||
size_t size = (char *)end - (char *)addr;
|
size_t size = (char *)end - (char *)addr;
|
||||||
|
|
||||||
|
if (!size) return;
|
||||||
|
|
||||||
if ((ptr = wine_anon_mmap( addr, size, PROT_NONE, MAP_NORESERVE )) != (void *)-1)
|
if ((ptr = wine_anon_mmap( addr, size, PROT_NONE, MAP_NORESERVE )) != (void *)-1)
|
||||||
{
|
{
|
||||||
if (ptr == addr)
|
if (ptr == addr)
|
||||||
|
|
Loading…
Reference in New Issue