Browse Source

* set p to nil when 0 is passed to reallocmem

peter 23 years ago
parent
commit
551caf65d2
1 changed files with 5 additions and 1 deletions
  1. 5 1
      rtl/inc/heaptrc.pp

+ 5 - 1
rtl/inc/heaptrc.pp

@@ -595,6 +595,7 @@ begin
    begin
    begin
      if p<>nil then
      if p<>nil then
       TraceFreeMem(p);
       TraceFreeMem(p);
+     p:=nil;
      TraceReallocMem:=P;
      TraceReallocMem:=P;
      exit;
      exit;
    end;
    end;
@@ -1148,7 +1149,10 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.21  2002-11-30 23:34:43  carl
+  Revision 1.22  2002-12-26 10:46:54  peter
+    * set p to nil when 0 is passed to reallocmem
+
+  Revision 1.21  2002/11/30 23:34:43  carl
     * nil should give an error!
     * nil should give an error!
 
 
   Revision 1.20  2002/10/30 20:39:13  peter
   Revision 1.20  2002/10/30 20:39:13  peter