aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-02-12 22:13:18 +0000
committerFred Fish <fnf@specifix.com>1996-02-12 22:13:18 +0000
commitc37c7c6ca3fa434247cdc43c212c83ad4be2741f (patch)
treeae034e40f8c6622e83ad753014bf6c36f5d8a6e4 /gdb
parent1d0e0732763491c3d06cabd03cf71372111f472b (diff)
downloadgdb-c37c7c6ca3fa434247cdc43c212c83ad4be2741f.zip
gdb-c37c7c6ca3fa434247cdc43c212c83ad4be2741f.tar.gz
gdb-c37c7c6ca3fa434247cdc43c212c83ad4be2741f.tar.bz2
* somsolib.c (som_solib_add): Use xmalloc rather than bare
unchecked call to malloc. * remote-mips.c (pmon_load_fast): ditto. * remote-mm.c (mm_open): ditto. * hpread.c (hpread_lookup_type): ditto. * remote-adapt.c (adapt_open): ditto.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/hpread.c2
-rw-r--r--gdb/remote-adapt.c2
-rw-r--r--gdb/remote-mips.c4
-rw-r--r--gdb/remote-mm.c2
-rw-r--r--gdb/somsolib.c2
6 files changed, 15 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 505166d..6eb9d9b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+Mon Feb 12 14:17:52 1996 Fred Fish <fnf@cygnus.com>
+
+ * somsolib.c (som_solib_add): Use xmalloc rather than bare
+ unchecked call to malloc.
+ * remote-mips.c (pmon_load_fast): ditto.
+ * remote-mm.c (mm_open): ditto.
+ * hpread.c (hpread_lookup_type): ditto.
+ * remote-adapt.c (adapt_open): ditto.
+
Mon Feb 12 13:11:32 1996 Fred Fish <fnf@cygnus.com>
* f-lang.c (allocate_saved_bf_node, allocate_saved_function_node,
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 2463f13..c8fbec0 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -1215,7 +1215,7 @@ hpread_lookup_type (hp_type, objfile)
{
TYPE_VECTOR_LENGTH (objfile) = 100;
TYPE_VECTOR (objfile) = (struct type **)
- malloc (TYPE_VECTOR_LENGTH (objfile) * sizeof (struct type *));
+ xmalloc (TYPE_VECTOR_LENGTH (objfile) * sizeof (struct type *));
}
while (index >= TYPE_VECTOR_LENGTH (objfile))
TYPE_VECTOR_LENGTH (objfile) *= 2;
diff --git a/gdb/remote-adapt.c b/gdb/remote-adapt.c
index a3110ef..8fcb1f7 100644
--- a/gdb/remote-adapt.c
+++ b/gdb/remote-adapt.c
@@ -484,7 +484,7 @@ erroid:
error ("\
Please include the name of the device for the serial port,\n\
the baud rate, and the name of the program to run on the remote system.");
- dev_name = (char*)malloc(p - name + 1);
+ dev_name = (char*)xmalloc(p - name + 1);
strncpy (dev_name, name, p - name);
dev_name[p - name] = '\0';
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 68d61b7..27bcf86 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -2705,8 +2705,8 @@ pmon_load_fast (file)
int final;
int finished = 0;
- buffer = (char *)malloc(MAXRECSIZE + 1);
- binbuf = (unsigned char *)malloc(BINCHUNK);
+ buffer = (char *)xmalloc(MAXRECSIZE + 1);
+ binbuf = (unsigned char *)xmalloc(BINCHUNK);
abfd = bfd_openr(file,0);
if (!abfd)
diff --git a/gdb/remote-mm.c b/gdb/remote-mm.c
index 360aa9d..101d964 100644
--- a/gdb/remote-mm.c
+++ b/gdb/remote-mm.c
@@ -260,7 +260,7 @@ mm_open (name, from_tty)
if (p == 0 || *p == '\0')
erroid:
error ("Usage : <command> <serial-device> <baud-rate> [progname]");
- dev_name = (char*)malloc (p - name + 1);
+ dev_name = (char*)xmalloc (p - name + 1);
strncpy (dev_name, name, p - name);
dev_name[p - name] = '\0';
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index 2d232b3..ebec205 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -301,7 +301,7 @@ som_solib_add (arg_string, from_tty, target)
text_addr = extract_unsigned_integer (buf, 4);
- new_so = (struct so_list *) malloc (sizeof (struct so_list));
+ new_so = (struct so_list *) xmalloc (sizeof (struct so_list));
memset ((char *)new_so, 0, sizeof (struct so_list));
if (so_list_head == NULL)
{