mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 19:05:54 +02:00
* return nil in SysTinyReallocMem, when the size parameter is 0
git-svn-id: trunk@26892 -
This commit is contained in:
parent
03415e1cac
commit
640f6ea300
@ -216,7 +216,10 @@
|
||||
{$ifdef DEBUG_TINY_HEAP}
|
||||
Write('SysTinyReAllocMem(', ptruint(p), ',', size, ')=');
|
||||
{$endif DEBUG_TINY_HEAP}
|
||||
result := AllocMem(size);
|
||||
if size=0 then
|
||||
result := nil
|
||||
else
|
||||
result := AllocMem(size);
|
||||
if result <> nil then
|
||||
begin
|
||||
if p <> nil then
|
||||
|
Loading…
Reference in New Issue
Block a user