* 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.
This commit is contained in:
Fred Fish 1996-02-12 22:13:18 +00:00
parent 1d0e073276
commit c37c7c6ca3
6 changed files with 15 additions and 6 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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';

View File

@ -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)

View File

@ -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';

View File

@ -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)
{