]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Approved by msynder@redhat.com
authorFred Fish <fnf@specifix.com>
Thu, 24 Jan 2002 04:08:33 +0000 (04:08 +0000)
committerFred Fish <fnf@specifix.com>
Thu, 24 Jan 2002 04:08:33 +0000 (04:08 +0000)
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.

gdb/ChangeLog
gdb/mdebugread.c

index fa8553c98391bc311d27a1b052b16fa1a39c67c1..32ae048843199c9c3f729f8894646ec55cbd570a 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2002-01-23  Elena Zannoni  <ezannoni@redhat.com>
 
         * Makefile.in (hpread_h): Delete. 
index 7be8080b11b407e5fedfd539a40145284cd17873..629fa9a32643dbc10889feb67bc5ba712163081f 100644 (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;
                  }