diff options
author | Neil Booth <neilb@earthling.net> | 2000-08-17 18:01:43 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-08-17 18:01:43 +0000 |
commit | 709e9e509cdca723aec76fb1076b2feb1264192b (patch) | |
tree | 08a55b2310020143695da9578d6843781f8dda0a /gcc/cppinit.c | |
parent | e33f6253857ef2e87ad037c0452c09db7a940b8c (diff) | |
download | gcc-709e9e509cdca723aec76fb1076b2feb1264192b.zip gcc-709e9e509cdca723aec76fb1076b2feb1264192b.tar.gz gcc-709e9e509cdca723aec76fb1076b2feb1264192b.tar.bz2 |
cppinit.c (cpp_cleanup): Free include dir chains.
* cppinit.c (cpp_cleanup): Free include dir chains.
* cpplib.c (do_undef): Let _cpp_free_definition make the node void.
(do_unassert): Free the assert with _cpp_free_definition.
* cppmacro.c (_cpp_free_definition): Free memory allocated for
assertions. Make the node a T_VOID node.
From-SVN: r35765
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 0cb90ab..e91f1be 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -467,6 +467,8 @@ void cpp_cleanup (pfile) cpp_reader *pfile; { + struct file_name_list *dir, *next; + while (CPP_BUFFER (pfile) != NULL) cpp_pop_buffer (pfile); @@ -480,6 +482,13 @@ cpp_cleanup (pfile) _cpp_cleanup_includes (pfile); _cpp_cleanup_stacks (pfile); _cpp_cleanup_macros (pfile); + + for (dir = CPP_OPTION (pfile, quote_include); dir; dir = next) + { + next = dir->next; + free (dir->name); + free (dir); + } } |