mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 12:19:02 +00:00
Update Lua to 5.3.6
This commit is contained in:
@@ -1011,8 +1011,13 @@ static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {
|
||||
free(ptr);
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
return realloc(ptr, nsize);
|
||||
else { /* cannot fail when shrinking a block */
|
||||
void *newptr = realloc(ptr, nsize);
|
||||
if (newptr == NULL && ptr != NULL && nsize <= osize)
|
||||
return ptr; /* keep the original block */
|
||||
else /* no fail or not shrinking */
|
||||
return newptr; /* use the new block */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user