message_free_last_container(m);
m->containers = mfree(m->containers);
- m->containers_allocated = 0;
m->root_container.index = 0;
}
if (!c->need_offsets)
return 0;
- if (!GREEDY_REALLOC(c->offsets, c->offsets_allocated, c->n_offsets + 1))
+ if (!GREEDY_REALLOC(c->offsets, c->n_offsets + 1))
return -ENOMEM;
c->offsets[c->n_offsets++] = offset;
assert_return(!m->poisoned, -ESTALE);
/* Make sure we have space for one more container */
- if (!GREEDY_REALLOC(m->containers, m->containers_allocated, m->n_containers + 1)) {
+ if (!GREEDY_REALLOC(m->containers, m->n_containers + 1)) {
m->poisoned = true;
return -ENOMEM;
}
if (m->n_containers >= BUS_CONTAINER_DEPTH)
return -EBADMSG;
- if (!GREEDY_REALLOC(m->containers, m->containers_allocated, m->n_containers + 1))
+ if (!GREEDY_REALLOC(m->containers, m->n_containers + 1))
return -ENOMEM;
if (message_end_of_signature(m))