re PR preprocessor/36819 (memleak in split_quote_chain)

2011-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR preprocessor/36819
	* incpath.c (merge_include_chains): Call free_path on
	heads[QUOTE] and tails[QUOTE].

From-SVN: r179426
This commit is contained in:
Paolo Carlini 2011-10-02 12:31:40 +00:00 committed by Paolo Carlini
parent e8775f2593
commit 61e0e2f8af
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2011-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR preprocessor/36819
* incpath.c (merge_include_chains): Call free_path on
heads[QUOTE] and tails[QUOTE].
2011-10-02 Jan Hubicka <jh@suse.cz>
PR lto/47247

View File

@ -362,6 +362,8 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
void
split_quote_chain (void)
{
free_path (heads[QUOTE], REASON_QUIET);
free_path (tails[QUOTE], REASON_QUIET);
heads[QUOTE] = heads[BRACKET];
tails[QUOTE] = tails[BRACKET];
heads[BRACKET] = NULL;