Browse Source

Fix memory leak on error.

Martijn Laan 7 years ago
parent
commit
d0f665aa7b
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Projects/Compile.pas

+ 2 - 0
Projects/Compile.pas

@@ -773,6 +773,8 @@ begin
       end;
     end;
   except
+    for I := Result.Count-1 downto 0 do
+      TMemoryStream(Result[I]).Free;
     Result.Free;
     raise;
   end;