浏览代码

* set p to nil when 0 is passed to reallocmem

peter 23 年之前
父节点
当前提交
551caf65d2
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      rtl/inc/heaptrc.pp

+ 5 - 1
rtl/inc/heaptrc.pp

@@ -595,6 +595,7 @@ begin
    begin
      if p<>nil then
       TraceFreeMem(p);
+     p:=nil;
      TraceReallocMem:=P;
      exit;
    end;
@@ -1148,7 +1149,10 @@ finalization
 end.
 {
   $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!
 
   Revision 1.20  2002/10/30 20:39:13  peter