mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 13:09:22 +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}
|
{$ifdef DEBUG_TINY_HEAP}
|
||||||
Write('SysTinyReAllocMem(', ptruint(p), ',', size, ')=');
|
Write('SysTinyReAllocMem(', ptruint(p), ',', size, ')=');
|
||||||
{$endif DEBUG_TINY_HEAP}
|
{$endif DEBUG_TINY_HEAP}
|
||||||
result := AllocMem(size);
|
if size=0 then
|
||||||
|
result := nil
|
||||||
|
else
|
||||||
|
result := AllocMem(size);
|
||||||
if result <> nil then
|
if result <> nil then
|
||||||
begin
|
begin
|
||||||
if p <> nil then
|
if p <> nil then
|
||||||
|
Loading…
Reference in New Issue
Block a user