c-common.c (fname_as_string): Free namep if we are returning cstr.text.

* c-common.c (fname_as_string): Free namep if we are returning
	cstr.text.

From-SVN: r92095
This commit is contained in:
Kazu Hirata 2004-12-13 17:14:56 +00:00 committed by Kazu Hirata
parent 681b5028d9
commit 029fc60b14
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-12-13 Kazu Hirata <kazu@cs.umass.edu>
* c-common.c (fname_as_string): Free namep if we are returning
cstr.text.
2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
* tree-cfg.c (remove_useless_stmts_cond): Call fold on COND_EXPR_COND.

View File

@ -755,7 +755,10 @@ fname_as_string (int pretty_p)
strname.len = len - 1;
if (cpp_interpret_string (parse_in, &strname, 1, &cstr, false))
return (char *) cstr.text;
{
XDELETEVEC (namep);
return (char *) cstr.text;
}
}
else
namep = xstrdup (name);