diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2001-01-09 09:30:43 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2001-01-09 09:30:43 +0000 |
commit | 4b49c3657f581b4f484f7dd380d174a95449cdd1 (patch) | |
tree | 6a914eec78331aa78c3ba5cf75eb5831f611cb32 /gcc/cppinit.c | |
parent | bad48d7ebd711c4e79d6ae31602c9fb805d2d5b7 (diff) | |
download | gcc-4b49c3657f581b4f484f7dd380d174a95449cdd1.zip gcc-4b49c3657f581b4f484f7dd380d174a95449cdd1.tar.gz gcc-4b49c3657f581b4f484f7dd380d174a95449cdd1.tar.bz2 |
cppinit.c (cpp_cleanup): NULLify macro_buffer and zero macro_buffer_len.
* cppinit.c (cpp_cleanup): NULLify macro_buffer and zero
macro_buffer_len.
* cppmacro.c (cpp_macro_definition): Reset macro_buffer_len when
realloc()ing macro_buffer.
From-SVN: r38821
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 12844d9..44e10c8 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -570,7 +570,11 @@ cpp_cleanup (pfile) cpp_pop_buffer (pfile); if (pfile->macro_buffer) - free ((PTR) pfile->macro_buffer); + { + free ((PTR) pfile->macro_buffer); + pfile->macro_buffer = NULL; + pfile->macro_buffer_len = 0; + } deps_free (pfile->deps); |