This replaces a use of xfree with a byte_vector.
Reviewed-by: Keith Seitz <keiths@redhat.com>
{
const struct bt_definition *array
= bt_ctf_get_field (event, scope, "contents");
- gdb_byte *contents;
int k;
- contents = (gdb_byte *) xmalloc (mlen);
+ gdb::byte_vector contents (mlen);
for (k = 0; k < mlen; k++)
{
memcpy (readbuf, &contents[offset - maddr], amt);
- xfree (contents);
-
/* Restore the position. */
bt_iter_set_pos (bt_ctf_get_iter (ctf_iter), pos);