* remote.c (init_remote_state): Use xrealloc instead of xmalloc.
authorDaniel Jacobowitz <drow@false.org>
Tue, 4 Jul 2006 13:31:31 +0000 (13:31 +0000)
committerDaniel Jacobowitz <drow@false.org>
Tue, 4 Jul 2006 13:31:31 +0000 (13:31 +0000)
gdb/ChangeLog
gdb/remote.c

index 1a4e88a89f521c31d9db1fa81dbf289972da5b41..0f592a32f74417ed90c7cd4087276ccd9ea4e91f 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-04  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * remote.c (init_remote_state): Use xrealloc instead of xmalloc.
+
 2006-07-03  Nathan J. Williams  <nathanw@wasabisystems.com>
 
        * bsd-kvm.c (bsd_kvm_open): Open the KVM interface read-write if
index 89fe8007dc83a1d6dcbf3483de9619ef88eaf418..c8e93d00f80bf373672e2f9b5374a264deebc6e1 100644 (file)
@@ -334,7 +334,7 @@ init_remote_state (struct gdbarch *gdbarch)
   if (rs->buf_size < rsa->remote_packet_size)
     {
       rs->buf_size = 2 * rsa->remote_packet_size;
-      rs->buf = xmalloc (rs->buf_size);
+      rs->buf = xrealloc (rs->buf, rs->buf_size);
     }
 
   return rsa;