The latter is the only caller of the former.
membuffer_write(buf, value, len);
}
-static void membuffer_free(struct membuffer *buf)
-{
- free(buf->data);
- free(buf);
-}
-
static unsigned membuffer_get_size(const struct membuffer *buf)
{
return buf->written;
membuffer_write(buf, 0, bytes);
bufptr = membuffer_get_ptr(buf);
if (read_data(src, bufptr + oldsize, bytes) != bytes) {
- membuffer_free(buf);
+ free(buf->data);
+ free(buf);
return false;
}
return true;