Avoid zero size allocations.

This commit is contained in:
Alexandre Julliard 2004-06-04 01:01:17 +00:00
parent deca2502d6
commit 7d2f5a7b15
1 changed files with 2 additions and 0 deletions

View File

@ -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)