I understand the point now. Well, a more general solution would be
to have two `free` callbacks (one for the data, another for the buffer).

For instance, imagine a buffer that was created via `new` but the data comes from `realloc`:

```c++
hoedown_buffer *buffer = new hoedown_buffer;
hoedown_buffer_init(buffer, 512, realloc, free);
```

There's no way to free the buffer properly. (of course you'll never mix `new` and `malloc` explicitely, but there are cases where the buffer is managed by i.e. the JVM, and the data isn't, so they must be freed in different ways)

Instead, we could have `buffer_init` accept two `free` callbacks. That would solve your problem:

```c
hoedown_buffer buffer;
hoedown_buffer_init(&buffer, 512, realloc, free, noop);
// do something with buffer
hoedown_buffer_free(&buffer); // can be safely called

void noop(void* ptr) {}
```

or my other example:

```c++
hoedown_buffer *buffer = new hoedown_buffer;
hoedown_buffer_init(buffer, 512, realloc, free, cpp_delete);
// do something with buffer
hoedown_buffer_free(buffer); // can be safely called

void cpp_delete(void* ptr) {
  delete ptr;
}
```

It's more flexible, safer and there's no need for `buffer_free_data`.