author | Florian Forster <octo@collectd.org> | |
Mon, 9 Mar 2015 09:59:38 +0000 (10:59 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Mon, 9 Mar 2015 10:04:20 +0000 (11:04 +0100) | ||
commit | 2daef0be77f9a49287432a22ba0d04494602588d | |
tree | ad0b5fddee729b88e1ee0cca434fe86c0910dc3f | tree | snapshot |
parent | 0accb683c9a07989c5b945b6217184f13f0b42b5 | commit | diff |
write_mongodb plugin: Fix BSON memory handling even further.
According to the mongo-c-driver 0.8.1 documentation, each call to
bson_alloc() needs to be matched by a call to bson_dealloc() and each
call to bson_init() needs to be matched by a call to bson_destroy().
Additionally, this patch adds macros for mongo-c-driver < 0.8.0 to map
the new bson_alloc() and bson_deallow() names to the old bson_create()
and bson_dispose() symbol names.
Tested with mongo-c-driver 0.8.1 and 0.7.1.
Fixes: #331, #956
According to the mongo-c-driver 0.8.1 documentation, each call to
bson_alloc() needs to be matched by a call to bson_dealloc() and each
call to bson_init() needs to be matched by a call to bson_destroy().
Additionally, this patch adds macros for mongo-c-driver < 0.8.0 to map
the new bson_alloc() and bson_deallow() names to the old bson_create()
and bson_dispose() symbol names.
Tested with mongo-c-driver 0.8.1 and 0.7.1.
Fixes: #331, #956
src/write_mongodb.c | diff | blob | history |