소스 검색

* Avoid memory leak in TExportLibWin.preparelib

git-svn-id: trunk@5546 -
pierre 19 년 전
부모
커밋
f7da7486a3
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      compiler/systems/t_win.pas

+ 6 - 4
compiler/systems/t_win.pas

@@ -581,14 +581,16 @@ implementation
         EList_nonindexed.Free;
         inherited;
       end;
-      
-    
+
+
     procedure TExportLibWin.preparelib(const s:string);
       begin
          if current_asmdata.asmlists[al_exports]=nil then
            current_asmdata.asmlists[al_exports]:=TAsmList.create;
-         EList_indexed:=tFPList.Create;
-         EList_nonindexed:=tFPList.Create;
+         if EList_indexed=nil then
+           EList_indexed:=tFPList.Create;
+         if EList_nonindexed=nil then
+           EList_nonindexed:=tFPList.Create;
       end;