aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib.adb
diff options
context:
space:
mode:
authorSerguei Rybin <rybin@adacore.com>2007-04-06 11:23:43 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-04-06 11:23:43 +0200
commit2491bb7d8eff1dbc3d0639a05b8583c7e9e28d55 (patch)
tree477ff339ebff2bbb3bb23cf9465b2e5c123e5a62 /gcc/ada/lib.adb
parent00f74faf0ab88647128d8b8a94a5da867f0cf5a6 (diff)
downloadgcc-2491bb7d8eff1dbc3d0639a05b8583c7e9e28d55.zip
gcc-2491bb7d8eff1dbc3d0639a05b8583c7e9e28d55.tar.gz
gcc-2491bb7d8eff1dbc3d0639a05b8583c7e9e28d55.tar.bz2
lib.ads, lib.adb (Tree_Read): Release the memory occupied by the switches from previously loaded tree
2007-04-06 Serguei Rybin <rybin@adacore.com> * lib.ads, lib.adb (Tree_Read): Release the memory occupied by the switches from previously loaded tree From-SVN: r123581
Diffstat (limited to 'gcc/ada/lib.adb')
-rw-r--r--gcc/ada/lib.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/lib.adb b/gcc/ada/lib.adb
index 069474f..1a92677 100644
--- a/gcc/ada/lib.adb
+++ b/gcc/ada/lib.adb
@@ -994,7 +994,12 @@ package body Lib is
begin
Units.Tree_Read;
- -- Read Compilation_Switches table
+ -- Read Compilation_Switches table. First release the memory occupied
+ -- by the previously loaded switches.
+
+ for J in Compilation_Switches.First .. Compilation_Switches.Last loop
+ Free (Compilation_Switches.Table (J));
+ end loop;
Tree_Read_Int (N);
Compilation_Switches.Set_Last (N);