mongodb/libbson — pull request #18 by jjwchoy (2014-01-19 14:58:15+00:00)
Title: Added support for a NULL realloc function to bson_writer

It is possible to specify a NULL realloc function when initialising a bson_writer. This commit prevents invocation of a NULL function pointer.

NULL realloc_function's are useful for writing into fixed size buffers.

Note: I had to modify bson_writer_begin to indicate success/failure via a return value.