mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 19:10:17 +02:00
* handle SysTinyFreeMem(nil) properly (i.e. succeed silently, without writing to
nil pointer memory) git-svn-id: trunk@26890 -
This commit is contained in:
parent
c00b56ae49
commit
858efec84e
@ -180,6 +180,11 @@
|
||||
{$ifdef DEBUG_TINY_HEAP}
|
||||
Writeln('SysTinyFreeMem(', ptruint(Addr), ')');
|
||||
{$endif DEBUG_TINY_HEAP}
|
||||
if addr=nil then
|
||||
begin
|
||||
result:=0;
|
||||
exit;
|
||||
end;
|
||||
sz := Align(FindSize(addr)+SizeOf(ptruint), sizeof(pointer));
|
||||
|
||||
InternalTinyFreeMem(@pptruint(addr)[-1], sz);
|
||||
|
Loading…
Reference in New Issue
Block a user