Browse Source

* fix heaptrace segfault, access of lost block

git-svn-id: trunk@7806 -
micha 18 years ago
parent
commit
b4363e046b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      rtl/inc/heaptrc.pp

+ 2 - 1
rtl/inc/heaptrc.pp

@@ -673,8 +673,9 @@ begin
       { allocated in different heap, push to that todolist }
       pp^.todonext := pp^.todolist^;
       pp^.todolist^ := pp;
+      TraceFreeMemSize := pp^.size;
       leavecriticalsection(todo_lock);
-      exit(pp^.size);
+      exit;
     end;
   end;
   TraceFreeMemSize:=InternalFreeMemSize(loc_info,p,pp,size,release_lock);