2002-01-23  Fred Fish  <fnf@redhat.com>
	* mdebugread.c (parse_partial_symbols): Only copy stabstring1 to
	stabstring on initial malloc.  Reallocing will copy it for us,
	if necessary.
This commit is contained in:
Fred Fish
2002-01-24 04:08:33 +00:00
parent 8af51c360e
commit 86f902e0d1
2 changed files with 10 additions and 2 deletions

View File

@@ -2707,8 +2707,10 @@ parse_partial_symbols (struct objfile *objfile)
&& stabstring != debug_info->ss + fh->issBase + sh.iss)
stabstring = xrealloc (stabstring, len + len2 + 1);
else
stabstring = xmalloc (len + len2 + 1);
strcpy (stabstring, stabstring1);
{
stabstring = xmalloc (len + len2 + 1);
strcpy (stabstring, stabstring1);
}
strcpy (stabstring + len, stabstring2);
len += len2;
}