Переглянути джерело

* fixed memory leak due to double allocation of typedconstbuilder and wrong
free location

git-svn-id: trunk@30853 -

Jonas Maebe 10 роки тому
батько
коміт
ce49f5fb41
1 змінених файлів з 1 додано та 2 видалено
  1. 1 2
      compiler/ncgcon.pas

+ 1 - 2
compiler/ncgcon.pas

@@ -389,7 +389,6 @@ implementation
                         begin
                           current_asmdata.getglobaldatalabel(lastlabel.lab);
 
-                          datatcb:=ctai_typedconstbuilder.create([tcalo_is_lab,tcalo_make_dead_strippable]);
                           { include terminating zero }
                           getmem(pc,len+1);
                           move(value_str^,pc[0],len);
@@ -408,8 +407,8 @@ implementation
                         end;
                       else
                         internalerror(2013120103);
-                      datatcb.free;
                    end;
+                   datatcb.free;
                    lab_str:=lastlabel.lab;
                    entry^.Data:=lastlabel.lab;
                 end;