As originally reported, a memory leak in this call stack:
libbson-1.0.so.0.0.0`bson_malloc+0xa libbson-1.0.so.0.0.0`bson_copy_to+0xaf libmongoc-1.0.so.0.0.0`_mongoc_cluster_ismaster+0x4cf libmongoc-1.0.so.0.0.0`_mongoc_cluster_reconnect_replica_set+0x496 libmongoc-1.0.so.0.0.0`_mongoc_cluster_reconnect+0x2d3 libmongoc-1.0.so.0.0.0`_mongoc_cluster_sendv+0xe6 libmongoc-1.0.so.0.0.0`_mongoc_cursor_next+0x29c libmongoc-1.0.so.0.0.0`mongoc_cursor_next+0x65 libmongoc-1.0.so.0.0.0`mongoc_client_command_simple+0x51
Looking on the code https://github.com/mongodb/mongo-c-driver/blob/a0997439c86276f0dcdb49550636b11f3e407384/src/mongoc/mongoc-cluster.c#L1167
it seems like that before copying bson to tags - you need to free it first.
- is related to
-
CDRIVER-745 Crash in bson_destroy, called from _mongoc_cluster_disconnect_node
- Closed