* macro.c (get_any_string): Free malloced br_buf.
(do_formals): Free 'formal'.
This commit is contained in:
parent
f956bf33e2
commit
4ac14836c9
|
@ -1,6 +1,8 @@
|
||||||
2011-03-30 Michael Snyder <msnyder@vmware.com>
|
2011-03-30 Michael Snyder <msnyder@vmware.com>
|
||||||
|
|
||||||
* obj-elf.c (obj_elf_section): Free malloced name.
|
* obj-elf.c (obj_elf_section): Free malloced name.
|
||||||
|
* macro.c (get_any_string): Free malloced br_buf.
|
||||||
|
(do_formals): Free 'formal'.
|
||||||
|
|
||||||
2011-03-30 Tristan Gingold <gingold@adacore.com>
|
2011-03-30 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* macro.c - macro support for gas
|
/* macro.c - macro support for gas
|
||||||
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||||
2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
2004, 2005, 2006, 2007, 2008, 2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Written by Steve and Judy Chamberlain of Cygnus Support,
|
Written by Steve and Judy Chamberlain of Cygnus Support,
|
||||||
sac@cygnus.com
|
sac@cygnus.com
|
||||||
|
@ -407,7 +407,10 @@ get_any_string (int idx, sb *in, sb *out)
|
||||||
&& in->ptr[idx] != tchar)
|
&& in->ptr[idx] != tchar)
|
||||||
sb_add_char (out, in->ptr[idx++]);
|
sb_add_char (out, in->ptr[idx++]);
|
||||||
if (idx == in->len)
|
if (idx == in->len)
|
||||||
|
{
|
||||||
|
free (br_buf);
|
||||||
return idx;
|
return idx;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case '(':
|
case '(':
|
||||||
case '[':
|
case '[':
|
||||||
|
@ -488,6 +491,7 @@ do_formals (macro_entry *macro, int idx, sb *in)
|
||||||
{
|
{
|
||||||
if (macro->formal_count)
|
if (macro->formal_count)
|
||||||
--idx;
|
--idx;
|
||||||
|
del_formal (formal); /* 'formal' goes out of scope. */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
idx = sb_skip_white (idx, in);
|
idx = sb_skip_white (idx, in);
|
||||||
|
|
Loading…
Reference in New Issue