diff options
author | Fred Fish <fnf@specifix.com> | 2002-01-24 04:08:33 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 2002-01-24 04:08:33 +0000 |
commit | aa67aa3cadd5a6d569286c91e7e5f3b5287e9e44 (patch) | |
tree | 0ab5655456565eb8e004e5955510ad225cdb950a /gdb/mdebugread.c | |
parent | 87033c3d86b71572e12283e9234c6cd862d6a01d (diff) | |
download | gdb-aa67aa3cadd5a6d569286c91e7e5f3b5287e9e44.tar.gz |
Approved by msynder@redhat.com
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.
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r-- | gdb/mdebugread.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 7be8080b11b..629fa9a3264 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -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; } |