2007-08-04 Michael Snyder <msnyder@access-company.com>
* tracepoint.c (add_register): Off by one error. (stringify_collection_list): Free malloc buffer.
This commit is contained in:
parent
ef18b5a26a
commit
27e06d3ef0
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-08-04 Michael Snyder <msnyder@access-company.com>
|
||||
|
||||
* tracepoint.c (add_register): Off by one error.
|
||||
(stringify_collection_list): Free malloc buffer.
|
||||
|
||||
2007-08-03 Michael Snyder <msnyder@access-company.com>
|
||||
|
||||
* mi-cmd-var.c (mi_cmd_var_delete): Remove unused variable,
|
||||
|
|
|
@ -1162,7 +1162,7 @@ add_register (struct collection_list *collection, unsigned int regno)
|
|||
{
|
||||
if (info_verbose)
|
||||
printf_filtered ("collect register %d\n", regno);
|
||||
if (regno > (8 * sizeof (collection->regs_mask)))
|
||||
if (regno >= (8 * sizeof (collection->regs_mask)))
|
||||
error (_("Internal: register number %d too large for tracepoint"),
|
||||
regno);
|
||||
collection->regs_mask[regno / 8] |= 1 << (regno % 8);
|
||||
|
@ -1489,7 +1489,10 @@ stringify_collection_list (struct collection_list *list, char *string)
|
|||
(*str_list)[ndx] = NULL;
|
||||
|
||||
if (ndx == 0)
|
||||
{
|
||||
free (str_list);
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
return *str_list;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue