There are a few places in the C driver source code where we call `malloc` directly instead of the `bson_malloc` wrapper. We need to replace all of these calls with the `bson_malloc` wrapper. Calls to malloc can be found as follows:
~/src/mongo-c-driver$ grep -rn "\<malloc (" * 2> /dev/null
Please be sure to replace all of the allocation functions with their appropriate `bson_*` counterpart, i.e.,
- free => bson_free
- malloc => bson_malloc
- calloc => bson_malloc0
- realloc => bson_realloc